dillon1000/react
Commit
Browse files [compiler] Flow support for playground
Summary: The playground currently has limited support for Flow files--it tries to parse them if the // flow sigil is on the fist line, but this is often not the case for files one would like to inspect in practice. more importantly, component syntax isn't supported even then, because it depends on the Hermes parser. This diff improves the state of flow support in the playground to make it more useful: when we see `flow` anywhere in the file, we'll assume it's a flow file, parse it with the Hermes parser, and disable typescript-specific features of Monaco editor. ghstack-source-id: b99b1568d7de602dd70d8cf1d8110d62530cf43b Pull Request resolved: https://github.com/facebook/react/pull/30150
Changed paths6 files
First-parent comparisoncompiler/apps/playground/components/Editor/EditorImpl.tsx ModifiedM compiler/apps/playground/components/Editor/Input.tsx ModifiedA compiler/apps/playground/lib/types.d.ts AddedM compiler/apps/playground/next.config.js ModifiedM compiler/apps/playground/package.json ModifiedM compiler/yarn.lock ModifiedPatch
Files changed
Rendering syntax-highlighted changes…