Skip to main content Module imports Copy item path Source NonLocalImportSpecifier An import specifier tracked by ProgramContext.
Corresponds to NonLocalImportSpecifier in the TS compiler. ProgramContext Context for the program being compiled.
Tracks compiled functions, generated names, and import requirements.
Equivalent to ProgramContext class in Imports.ts. add_imports_to_program Insert import declarations into the program body.
Handles both ESM imports and CommonJS require. get_react_compiler_runtime_module Get the runtime module name based on the compiler target. validate_restricted_imports Check for blocklisted import modules.
Returns a CompilerError if any blocklisted imports are found.