Skip to content

checkScript

function checkScript(script, globals): ScriptDiagnostic[];

Defined in: types/types.compiler.ts:36

Type-checks script against the ambient globals declaration file (see combineSandboxTypes) using the TypeScript compiler, and returns any diagnostics located in the script. An empty array means the script is valid.

Parameter Type
script string
globals string

ScriptDiagnostic[]