I am using the TypeScript Compiler API which literally has no documentation so hopefully someone can help here.
I'm trying to add in the ES2020 lib option to my compiler options when running ts.createProgram.
I found out that "lib" is a string[] where the CompilerOptions interface is defined here.
I tried setting lib as follows:
const program = ts.createProgram(files, {
    target: ts.ScriptTarget.ES2020,
    module: ts.ModuleKind.ES2015,
    lib: ["ES2020"], // <---
    ...
}, host);
This seems to not be working, I am getting constant compilation errors stating Cannot find name 'Array/Number/Math', etc, so the lib is clearly not being defined correctly.
How can I set the lib correctly???
Edit: I have a custom host object, with the following function which may be relevant to the question:
getDefaultLibFileName(options) {
    return ts.getDefaultLibFilePath(options);
}


hostlook like? Perhaps that's not searching in the correct place fornode_modules.node_modulesin my code that's being compiled. Anyway I'm trying to fix language built-ins such asMath, not anything from a node module.tsc