You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[compiler] Type inference for tagged template literals
At Meta we have a pattern of using tagged template literals for features that are compiled away:
```
// Relay:
graphql`...graphql text...`
```
In many cases these tags produce a primitive value, and we can get even more optimal output if we can tell the compiler about these types. The new moduleTypeProvider gives us the ability to declare such types, this PR extends the compiler to use this type information for TaggedTemplateExpression values.
ghstack-source-id: 3cd6511b7f4e708bcb86f3f3fde5773bc51c7197
Pull Request resolved: #30869
Copy file name to clipboardExpand all lines: compiler/packages/babel-plugin-react-compiler/src/__tests__/fixtures/compiler/destructuring-mixed-scope-and-local-variables-with-default.expect.md
+35-39
Original file line number
Diff line number
Diff line change
@@ -63,67 +63,63 @@ function useFragment(_arg1, _arg2) {
63
63
}
64
64
65
65
functionComponent(props) {
66
-
const$=_c(9);
67
-
let t0;
68
-
if ($[0] ===Symbol.for("react.memo_cache_sentinel")) {
0 commit comments