Adornis/typescript

Unknown compiler option 'composite' -- does this pkg supports project references?

dc165015 opened this issue · 5 comments

the new feature project references introduced by Typescript 3.0 is not supported?

After I run meteor, it reported error:

=> Errors prevented startup:                  
   
   While processing files with adornis:typescript (for target web.browser):
   packages/adornis:typescript-compiler/typescript-compiler.js:339:13: Format of the tsconfig is
   invalid: Error: Unknown compiler option 'composite'.
   at TypeScriptCompiler._parseConfig
   (packages/adornis:typescript-compiler/typescript-compiler.js:339:13)
   at TypeScriptCompiler._processConfig
   (packages/adornis:typescript-compiler/typescript-compiler.js:307:32)
   at TypeScriptCompiler.getBuildOptions
   (packages/adornis:typescript-compiler/typescript-compiler.js:82:10)
   at TypeScriptCompiler.processFilesForTarget
   (packages/adornis:typescript-compiler/typescript-compiler.js:106:26)

here is my tsconfig.json

{
    "compilerOptions": {
        "allowSyntheticDefaultImports": true,
        "esModuleInterop": true,
        "target": "es6",
        "module": "commonjs",
        "lib": [
            "dom",
            "es2015",
            "es2016.array.include"
        ],
        "allowJs": true,
        "checkJs": true,
        "composite": true,
        "declaration": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "sourceMap": true,
        "skipLibCheck": true,
        "strict": false,
        "alwaysStrict": true,
        "strictNullChecks": false,
        "noImplicitAny": false,
        "noImplicitThis": false,
        "noImplicitReturns": false,
        "noEmit": true,
        "noEmitHelpers": true,
        "downlevelIteration": true,
        "types": [
            "meteor",
            "meteor-accounts-phone",
            "meteor-collection-hooks",
            "meteor-roles",
            "simpl-schema",
            "jest"
        ],
        "baseUrl": ".",
        "paths": {
            "db/*": [ "imports/db/*" ],
            "collections/*": [ "imports/db/collections/*" ],
            "models/*": [ "imports/db/models/*" ],
            "apilib/*": [ "lib/*" ]
        }
    },
    "include": [ "**/*.ts", "**/*.js" ],
    "exclude": [
        ".meteor",
        ".deploy",
        "packages",
        "node_modules"
    ],
    "compileOnSave": false
}
yorrd commented

are you using references? Without having used the feature yet at all, from this I'm assuming that you need a reference section which I don't see.

yes, I am using references, the tsconfig.json is located in my sub-project located in workspaceDir/api.
The workspace is structured like this:
-workspaceDir
tsconfig.json
-api
-tsconfig.json
-ionic
-tsconfig.json

the tsconfig of workspace is:

{
    "references": [ {
        "path": "api"
    }, {
        "path": "ionic"
    }, ]
}

That is, I reference the server(api) project and the client(ionic) project from the workspaceDir.

yorrd commented

as far as I can tell, we're just forwarding the options to typescript, so that's a typescript thing. Also, your line numbers indicate you're not using the latest version of the package. Is that possible?

yes, you are right. when I install adornis:typescript, it always install v0.8.1 even if I create a brand new meteor project. I have no idea what's the logic under the hook. After I reinstall meteor, it installed the latest version(currently 0.9.12). the error is gone.

yorrd commented

great! :)