Search Unity

TypeScriptError tsconfig.override.json

Discussion in 'Project Tiny' started by Nhatsmall, Feb 10, 2019.

  1. Nhatsmall


    Oct 14, 2014
    When import tsconfig.override.json
    "compilerOptions": {
    "lib": ["es5", "es2015", "dom"]

  2. abeisgreat


    Nov 21, 2016
    So the short of this is that it's a bug in the Tiny helper utility.

    To work around it, you need to understand that the config file's "lib" option is a shorthand to include .d.ts files which are included with Typescript. You can manually include these by looking at the Typescript source and copying them into your project.

    The long version of this is that the way Tiny distributes Typescript is by rolling it up with a utility called pkg. This tool wraps up a version of Node with all the dependencies for the Tiny toolchain. It does its best to understand which files are needed in the package and which can be dropped. The TS declaration files aren't there because they aren't statically referenced by the TS compiler so pkg assumes they're not needed.

    This is an easy fix for the Tiny devs, just manually specifying that all of TS's lib/** files be included in the binary, but that'll require another release from them.
    raymondyunity likes this.