typescript-go icon indicating copy to clipboard operation
typescript-go copied to clipboard

config: target:"es6" prevents stdlib from loading

Open sandersn opened this issue 10 months ago • 1 comments

declarationEmitObjectAssignedDefaultExport

might be related to #312

sandersn avatar Feb 10 '25 17:02 sandersn

// @filename: first.ts
export const Key = Symbol()
/** @deprecated */
export type QW = number

with tsconfig.json

{
  "compilerOptions": {
    "target": "es6"
  },
  "files": ["first.ts"]
}

Gives

error TS2318: Cannot find global type 'Array'.
error TS2318: Cannot find global type 'Boolean'.
error TS2318: Cannot find global type 'Function'.
error TS2318: Cannot find global type 'IArguments'.
error TS2318: Cannot find global type 'Number'.
error TS2318: Cannot find global type 'Object'.
error TS2318: Cannot find global type 'RegExp'.
error TS2318: Cannot find global type 'String'.

from Corsa but no errors in Strada. Adding lib: ["es6"] to tsconfig stops the errors.

sandersn avatar Feb 19 '25 22:02 sandersn

This is fixed!

jakebailey avatar Jun 04 '25 07:06 jakebailey