MCPcopy Index your code
hub / github.com/react/react / parseLanguage

Function parseLanguage

compiler/packages/snap/src/compiler.ts:35–37  ·  view source on GitHub ↗
(source: string)

Source from the content-addressed store, hash-verified

33import {makeSharedRuntimeTypeProvider} from './sprout/shared-runtime-type-provider';
34
35export function parseLanguage(source: string): 'flow' | 'typescript' {
36 return source.indexOf('@flow') !== -1 ? 'flow' : 'typescript';
37}
38
39export function parseSourceType(source: string): 'script' | 'module' {
40 return source.indexOf('@script') !== -1 ? 'script' : 'module';

Callers 1

transformFixtureInputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected