MCPcopy Index your code
hub / github.com/TypeScriptToLua/TypeScriptToLua / validateOptions

Function validateOptions

src/CompilerOptions.ts:83–103  ·  view source on GitHub ↗
(options: CompilerOptions)

Source from the content-addressed store, hash-verified

81 options.luaBundle !== undefined && options.luaBundleEntry !== undefined;
82
83export function validateOptions(options: CompilerOptions): ts.Diagnostic[] {
84 const diagnostics: ts.Diagnostic[] = [];
85
86 if (options.luaBundle && !options.luaBundleEntry) {
87 diagnostics.push(diagnosticFactories.luaBundleEntryIsRequired());
88 }
89
90 if (options.luaBundle && options.luaLibImport === LuaLibImportKind.Inline) {
91 diagnostics.push(diagnosticFactories.usingLuaBundleWithInlineMightGenerateDuplicateCode());
92 }
93
94 if (options.luaBundle && options.buildMode === BuildMode.Library) {
95 diagnostics.push(diagnosticFactories.cannotBundleLibrary());
96 }
97
98 if (options.jsx && options.jsx !== JsxEmit.React) {
99 diagnostics.push(diagnosticFactories.unsupportedJsxEmit());
100 }
101
102 return diagnostics;
103}

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected