Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compat: gts files don't respect references and include from tsconfig #712

Open
runspired opened this issue Mar 17, 2024 · 0 comments
Open

Comments

@runspired
Copy link

Example tsconfig from a monorepo project (EmberData in this case)

{
  "include": ["src/**/*", "../../@types/fastboot", "../../@types/@glimmer/tracking.d.ts"],
  "glint": {
    "environment": ["ember-loose", "ember-template-imports"]
  },
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "skipLibCheck": true,
    "declarationDir": "unstable-preview-types",
    "emitDeclarationOnly": true,
    "noEmit": false,
    "allowJs": false,
    "checkJs": false,
    "alwaysStrict": true,
    "strict": true,
    "allowSyntheticDefaultImports": true,

    "noImplicitAny": true,
    "noImplicitThis": true,
    "strictBindCallApply": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "allowUnreachableCode": false,
    "allowUnusedLabels": false,
    "noEmitOnError": false,
    "strictNullChecks": true,
    "noErrorTruncation": true,
    "preserveConstEnums": false,
    "experimentalDecorators": true,
    "pretty": true,

    // Enable faster builds
    // but causes us to not rebuild properly
    "composite": true,
    "incremental": true,
    "rootDir": "src",

    "declaration": true,
    "declarationMap": true,
    "inlineSourceMap": true,
    "inlineSources": true,

    "baseUrl": "src",

    "paths": {
      "@ember-data/env": ["../../private-build-infra/virtual-packages/env.d.ts"]
    },

    "types": ["ember-source/types"]
  },
  "references": [{ "path": "../store" }, { "path": "../core-types" }, { "path": "../request" }]
}

ts files will properly resolve ember types and references paths, gts files will not.

image

My naive suspicion is that glint is generating a unique tsconfig for gts files that needs to copy forward these options and doesn't currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant