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

vscode & TypeScript & allowImportingTsExtensions #67

Open
xgqfrms opened this issue Feb 8, 2023 · 2 comments
Open

vscode & TypeScript & allowImportingTsExtensions #67

xgqfrms opened this issue Feb 8, 2023 · 2 comments
Labels
allowImportingTsExtensions allowImportingTsExtensions TypeScript TypeScript

Comments

@xgqfrms
Copy link
Owner

xgqfrms commented Feb 8, 2023

vscode & TypeScript & allowImportingTsExtensions

???

allowImportingTsExtensions

module "/Users/xgqfrms-mm/Documents/github/leetcode/js-solutions/large-dataset"

An import path can only end with a '.ts' extension when 'allowImportingTsExtensions' is enabled.ts(5097)

image

{
  "compilerOptions": {
    // "target": "ES2022",
    // "target": "ES2020",
    "target": "ESNext",
    // "module": "NodeNext",
    "module": "ESNext",
    "lib": [
      "ES2015",
      "ES2016",
      "ES2017",
      "ES2018",
      "ES2019",
      "ES2020",
      // "ES2021",
      // "ES2022",
      "ESNext",
      "dom",
      "dom.iterable"
    ],
    "downlevelIteration": false,
    "strict": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "forceConsistentCasingInFileNames": true,
    "sourceMap": true,
    "sourceRoot": "./src",
    "allowJs": true,
    // Generate d.ts files ✅
    "declaration": true,
    "checkJs": false,
    "noImplicitAny": false,
    "baseUrl": "./src",
    "locale": "zh-CN",
    "noImplicitReturns": true,
    // "allowImportingTsExtensions": true,
    // error TS5023: Unknown compiler option 'allowImportingTsExtensions'. ❌
    // "noEmit": true,
    // Option 'allowImportingTsExtensions' can only be used when either 'noEmit' or 'emitDeclarationOnly' is set.ts
    "incremental": false
  },
  "type": "module",
  "include": [
    // include folder ✅
    "src/**/*",
    "js-solutions/**/*",
    "test/**/*"
  ],
  "exclude": [
    "node_modules",
    "build",
    "js-solutions/**/*",
    "data-structures/**/*",
    "000-xyz/**/*",
    "test/**/*.spec.ts"
  ]
}

microsoft/TypeScript#52230

microsoft/TypeScript#52320

@xgqfrms
Copy link
Owner Author

xgqfrms commented Feb 8, 2023

@xgqfrms xgqfrms added allowImportingTsExtensions allowImportingTsExtensions TypeScript TypeScript labels Feb 8, 2023
@xgqfrms
Copy link
Owner Author

xgqfrms commented Feb 8, 2023

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

No branches or pull requests

1 participant