* Generate normal 1-part sourcemaps (at increased processing cost), since tools dislike sectional ones
* Add semicolon
* Accept sad baselines]
* Forward along sourcesContent if available
* Supress lint since the API actually calls for null here
* Fix concatenated sourcemap paths
* Accept bad baselines :(
* Add overloads
* Accept api update
* Fix lint
* Use more nodelike paths for import types when possible
* move functionality from services into compiler, fix with propert file/directory conflict handling
* mark suspect cast
* Enable '--strictNullChecks'
* Fix API baselines
* Make sys.getEnvironmentVariable non-nullable
* make properties optional instead of using `| undefined` in thier type
* reportDiagnostics should be required
* Declare firstAccessor as non-nullable
* Make `some` a type guard
* Fix `getEnvironmentVariable` definition in tests
* Pretend transformFlags are always defined
* Fix one more use of sys.getEnvironmentVariable
* `requiredResponse` accepts undefined, remove assertions
* Mark optional properties as optional instead of using `| undefined`
* Mark optional properties as optional instead of using ` | undefined`
* Remove unnecessary null assertions
* Put the bang on the declaration instead of every use
* Make `createMapFromTemplate` require a parameter
* Mark `EmitResult.emittedFiles` and `EmitResult.sourceMaps` as optional
* Plumb through undefined in emitLsit and EmitExpressionList
* `ElementAccessExpression.argumentExpression` can not be `undefined`
* Add overloads for `writeTokenText`
* Make `shouldWriteSeparatingLineTerminator` argument non-nullable
* Make `synthesizedNodeStartsOnNewLine` argument required
* `PropertyAssignment.initializer` cannot be undefined
* Use one `!` at declaration site instead of on every use site
* Capture host in a constant and avoid null assertions
* Remove few more unused assertions
* Update baselines
* Use parameter defaults
* Update baselines
* Fix lint
* Make Symbol#valueDeclaration and Symbol#declarations non-optional to reduce assertions
* Make Node#symbol and Type#symbol non-optional to reduce assertions
* Make `flags` non-nullable to reduce assertions
* Convert some asserts to type guards
* Make `isNonLocalAlias` a type guard
* Add overload for `getSymbolOfNode` for `Declaration`
* Some more `getSymbolOfNode` changes
* Push undefined suppression into `typeToTypeNodeHelper`
* `NodeBuilderContext.tracker` is never `undefined`
* use `Debug.assertDefined`
* Remove unnecessary tag
* Mark `LiteralType.freshType` and `LiteralTupe.regularType` as required
* Type side of import types
* Value side of import types
* Accept library changes
* Refined implementation, more tests
* Allow resolutions to be performed late if the resolution still results in a file already in the build
* Add another test case
* Add some jsdoc usages
* Allow nodebuilder to use import types where appropriate
* Parse & check generic instantiations
* use import types in nodebuilder for typeof module symbols
* Wire up go to definition for import types
* Accept updated type/symbol baselines now that symbols are wired in
* PR feedback
* Fix changes from merge
* Walk back late import handling
* Remove unused diagnostic
* Remove unrelated changes
* Use recursive function over loop
* Emit type arguments
* undo unrelated change
* Test for and support import type nodes in bundled declaration emit
* Add compiler option to enable declaration sourcemaps
* Transparent goto definition for sourcemapped declaration files
* Post-rebase touchups
* Rename API methods
* Fix lints
* Fix typo in name XD
* Log sourcemap decode errors
* Share the cache more, but also invalidate it more
* Remove todo
* Enable mapping on go to implementation as well
* Allow fourslash to test declaration maps mroe easily
* more test
* Handle sourceRoot
* Add tests documenting current behavior with other sourcemapping flags
* Ignore inline options for declaration file maps, simplify dispatch in emitter
* Change program diagnostic
* Fix nit
* Use charCodeAt
* Rename internal methods + veriables
* Avoid filter
* span -> position
* Use character codes
* Dont parse our sourcemap names until we need to start using them
* zero-index parsed positions
* Handle sourceMappingURL comments, including base64 encoded ones
* Unittest b64 decoder, make mroe robust to handle unicode properly
* Fix lint
* declarationMaps -> declarationMap
* Even more feedback
* USE Mroe lenient combined regexp
* only match base64 characters
* Fix nit
The diagnostics reporting and expression resolution caching is quite intermingled at present.
Hence when we tried to get the declaration output without getting diagnostics, the resolution for functions return expression is cached but errors arent reported
Symbols arent marked as referenced. So at later time when trying to get the diagnostics since the expression resolution is cached, it doesnt even go through all checks
For now get diagnostics irrespective of declaration only output to avoid this issue.
Fixes#21518
* Integrate importStar and importDefault helpers
* Accept baselines
* Support dynamic imports, write helpers for umd module (and amd is possible) kinds
* Accept baselines
* Support AMD, use same helper initialization as is normal
* update typechecker to have errors on called imported namespaces and good error recovery with a quickfix
* Overhaul allowSyntheticDefaultExports to be safer
* Put the new behavior behind a flag
* Rename strictESM to ESMInterop
* ESMInterop -> ESModuleInterop, make default for tsc --init
* Rename ESMInterop -> ESModuleInterop in module.ts, add emit test (since fourslash doesnt do that)
* Remove erroneous semicolons from helper
* Reword diagnostic
* Change style
* Edit followup diagnostic
* Add secondary quickfix for call sites, tests forthcoming
* Add synth default to namespace import type, enhance quickfix
* Pair of spare tests for good measure
* Fix typos in diagnostic message
* Improve comment clarity
* Actually accept the updated changes to the esmodule interop description
* ESModule -> esModule
* Use find and not forEach
* Use guard
* Rely on implicit falsiness of Result.False
* These should have been emit flags
Timestamps look like Gulp's, with grey times inside white brackets.
Files have cyan filenames, yellow line and column numbers, and grey TS{####} errors. I wonder if those are actually useful for folks using the --pretty CLI: are they used for anything outside Visual Studio... Can we just get rid of them?
Re-uses compiler/program's color logic in compiler/watch. The relevant variables are now exported and marked `@internal`. Is there a preferred way of re-using this code in both those files?