https://github.com/Microsoft/TypeScript

sort by:
Revision Author Date Message Commit Date
5a7d3ba Switch to classes? 15 November 2022, 07:18:09 UTC
10b4918 Switch to `{ __proto__: null }` 15 November 2022, 04:31:43 UTC
fc7c153 Switch to `Object.create(null)`. 15 November 2022, 01:58:42 UTC
c0f8d1c fix(51277): Array find thisArg fix from being void (#51278) 15 November 2022, 00:49:11 UTC
5016d13 fix(51112): skip checking binding parameters for functions that contains arguments (#51258) 15 November 2022, 00:32:36 UTC
fbdf00c Undo accidental style changes from Map/Set PR (#51529) 14 November 2022, 22:52:00 UTC
b553aff Fix smoke test substitution (#51494) 12 November 2022, 00:29:42 UTC
021fd20 Add smoke tests to CI (#51464) 11 November 2022, 22:07:37 UTC
2d5e372 Update package-lock.json 11 November 2022, 06:07:05 UTC
9ede7ce Fix incorrect spelling of packageId (#51483) 11 November 2022, 00:55:49 UTC
c5aea89 Add alias ResolutionMode for ModuleKind.ESNext | ModuleKind.CommonJs | undefined (#51482) * Add alias ResolutionMode for ModuleKind.ESNext | ModuleKind.CommonJs | undefined * ResolutionMode | undefined = ResolutionMode * More 11 November 2022, 00:47:46 UTC
3eafb64 Handle reusing type reference resolution in resolution cache correctly (#51475) * Add tests where typeRef resolution is not in the cache * Ensure that type ref reuse is actually handled since type ref resolution only sends containingSourceFileMode and not containingSourceFile 11 November 2022, 00:03:25 UTC
10125e4 Fix __importDefault when used on typescript libraries (#51474) 10 November 2022, 21:57:57 UTC
9eb8bd6 Update package-lock.json 10 November 2022, 06:07:04 UTC
57a916c Emit buildinfo if file deleted isnt global (#51472) * Add test for when file is deleted * Emit buildinfo if file deleted isnt global 10 November 2022, 02:07:17 UTC
9f64a3a Remove ts.{Map,Set,ESMap,Iterator} and associated types (#51439) 09 November 2022, 23:06:31 UTC
d798493 Remove no-unnecessary-qualifier from eslintrc (#51456) 09 November 2022, 23:02:29 UTC
2ade485 Make lkg task depend on local task instead (#51468) 09 November 2022, 21:46:28 UTC
e67b06e Simplistic watch mode for runtests (#51461) * Simplistic watch mode for runtests * Use esbuild WatchMode object for testRunner updates * switch AbortController to CancelToken 09 November 2022, 20:07:08 UTC
6e0a62e Detangle unittests to reference helpers directly (#51450) * Remove unnecessary redirection now that we are not in namespaces * Move the tsc helpers in one place * Move virtual file system with watch in unittests folder instead of harness since harness doesnt use it anyways * Replace protocol and commandNames * Revert incorrect pick 09 November 2022, 18:02:40 UTC
19091ab Fix missing awaits in Herebyfile (#51465) 09 November 2022, 16:00:58 UTC
0993c01 Fix JSDoc eslint rule for properties and methods (#51462) 09 November 2022, 00:35:10 UTC
d237468 Add --no-typecheck option for runtests/runtests-parallel/min/local (#51460) 08 November 2022, 23:39:04 UTC
1b35985 Fix --bundle=false on Windows (#51459) 08 November 2022, 23:20:22 UTC
b4715d3 Replace eslint-plugin-jsdoc by extending local jsdoc-format rule, saving ~20% of our linting time (#51438) 08 November 2022, 21:59:48 UTC
6a3b499 Remove leftover todo from mjs/cjs transition (#51453) 08 November 2022, 20:23:30 UTC
555d174 Bump volta/packageManager in package.json (#51445) 08 November 2022, 15:50:27 UTC
437b269 Update package-lock.json 08 November 2022, 06:07:08 UTC
20a0463 Depend on build-src in runtests (#51436) 08 November 2022, 01:19:15 UTC
39ccac6 Add known keys of the mapped type constraint to its members (#50081) * Add known keys of the mapped type constraint to its members * Avoid second pass of adding known members by instead passing `noReductions` to `mapType` 08 November 2022, 00:22:27 UTC
48aebcd TypeReference directive reuse (#49750) 07 November 2022, 23:15:11 UTC
1d96eb4 Merge pull request #51387 from jakebailey/typeformer-2 Closes https://github.com/microsoft/TypeScript/issues/35210 Closes https://github.com/microsoft/TypeScript/issues/39247 Closes https://github.com/microsoft/TypeScript/issues/49037 Closes https://github.com/microsoft/TypeScript/issues/49332 Closes https://github.com/microsoft/TypeScript/issues/50758 07 November 2022, 21:57:46 UTC
da6f067 Remove dynamicImport and setDynamicImport It turns out that the import expression won't actally be rewritten by esbuild, so we can just write it directly. While this won't help CJS emit, that already didn't work anyway, and it's likely that this code is going to be moved outside of the codebase into VS Code or a shared package elsewhere anyway. 07 November 2022, 21:36:22 UTC
7988e40 Remove outFiles from launch.json The troubleshooting wizard for the debugger actually says that this option is no longer recommended; removing it enables us to use source maps if we happen to be debugging while in --bundle=false mode. 07 November 2022, 21:36:22 UTC
8edbf8d Disable slow CodeQL queries See issue 10937 on github.com/github/codeql. 07 November 2022, 21:36:22 UTC
b9e24ee Remove globalThisShim and globalThis modification for TypeScriptServicesFactory Looking at github, sourcegraph, and internally, nobody appears to use this factory at all. It's still used within our testing framework, so I won't remove it, but we shouldn't be polyfilling globalThis and sticking things onto it these days. 07 November 2022, 21:36:22 UTC
43cf787 Remove Promise redeclaration Now that we target ES2018, we don't need to declare this ourselves. 07 November 2022, 21:36:22 UTC
25a85d1 Move compiler-debug into Debug namespace, which allows the compiler to be tree shaken This debug code was added quite a while ago, constructed such that we wouldn't have to ship this code to our users. However, this is the sole place in the compiler project where the ts namespace "escapes" the bundle. By moving this debug code into the compiler itself, we no longer have any references to the ts namespace itself for our bundles that don't export anything (tsc, typingsInstaller). This lets bundlers tree shake the compiler, reducing the size of our output by _5.7 MB_ (a ridiculous improvement for _adding_ code). 07 November 2022, 21:36:22 UTC
c5a9573 Ensure ts object passed to plugins contains deprecatedCompat declarations We pass the entire "ts" object into plugins. However, we need to make sure that that object contains the debug compat helpers. In the old codebase, the deprecated compat code would tack things onto the actual ts object, after the server code was executed, and later that same object would be given to plugins. But in modules, each TS project only sees the view of the "ts" namespace that their references implied, not the ts object as some sort of singleton. To ensure that plugins get the debug compat code, we have to bring that into each project's view of the ts namespace, and not add it on later in the executable projects. 07 November 2022, 21:36:08 UTC
db440d8 Directly import namespaces for improved esbuild output I should report this upstream, if I can manage to minimize this. 07 November 2022, 21:36:08 UTC
8486229 Export ts namespace from tsserver for hacky-post patching Unlike our other exectuables, tsserver is used in web, which means that there actually would have been a "ts" variable declared for those users (e.g. in a web worker). It looks like VS Code needs this variable to be declared, so change this bundle to look the same as other libraries. Note that in Node, the IIFE will never actually return, so this can have no effect. On web, it will return in order to yield control back to the event loop (as on web, postMessage is used to communicate). 07 November 2022, 21:35:48 UTC
acfe7ac Remove mkdirp If our build scripts target Node 10+, we can use the builtin mkdir function in recursive mode instead. 07 November 2022, 21:35:48 UTC
bbc906d Don't use needsUpdate for quick tasks needsUpdate may be wrong when the branch changes; these ones are now so fast thanks to being pure JS that we can just always run their contents and be sure that the outputs are right. 07 November 2022, 21:35:48 UTC
aec2761 Modernize localize script, use new XML library This file is pretty much the same as it was when it was committed in 2017; these days, we can write clearer code with async/await and new FS APIs. Additionally, we can improve the performance of this script by using a newer/faster/maintained XML library. This will enable us to run the script unconditionally in a later commit. 07 November 2022, 21:35:48 UTC
394c4ae Use jsonc-parser instead of LKG compiler in build Profiling the build roughly half of the time spent loading the build is spent importing typescript.js, for this one function. Since this stack is already adding required devDependencies, switch readJson to use jsonc-parser (published by the VS Code team), rather than importing the entire LKG typescript.js library. 07 November 2022, 21:35:48 UTC
d0db80e Update baselines for corrected line endings in lib files The old gulpfile produced lib.d.ts files with mixed newlines, thanks to the files containing CRLF, but the gulp streams adding in LF. Now they're all LF, which matches every other file in built / lib, but our baselines are sensitive to this. Rerun the tests and accept them. 07 November 2022, 21:35:48 UTC
3cd72e7 Change build system to hereby This eliminates a significant number of dependencies, eliminating all npm audit issues, speeding up `npm ci` by 20%, and overall making the build faster (faster startup, direct code is faster than streams, etc) and clearer to understand. I'm finding it much easier to make build changes for the module transform with this; I can more clearly indicate task dependencies and prevent running tasks that don't need to be run. Given we're changing our build process entirely (new deps, new steps), it seems like this is a good time to change things up. 07 November 2022, 21:35:48 UTC
f45cc45 Rename Gulpfile to Herebyfile for improved git diff The next commit will switch the build system, but git doesn't detect that the two config files are related. 07 November 2022, 21:35:48 UTC
776907c Add ts to globalThis in run.js for convenience during debugging In namespaces, we'd have access to a variable named "ts" when debugging, because that was just the ts namespace in the current file. But when modules, that variable doesn't exist, either because we are pure modules (so no ts variable), or named something else (when bundled, for export). Tack a "ts" object onto the globals, which should make this easier. Of course, someone may eventually declare a variable in the top level scope named "ts" and break this, but we can cross that bridge when we come to it. 07 November 2022, 21:35:48 UTC
dc92488 Consolidate checks that test if the current environment is Node When bundled, it's very likely that the function "require" will actually exist at runtime, so we can't use this to determine if we are running in Node. Consolidate that logic and use other things to check instead. This is still not perfectly accurate, but I don't want to change this _too_ much, lest someone downstream depend on our inconsistent logic. There are yet other places this commit does not fix; search for "typeof process" for more examples. 07 November 2022, 21:35:48 UTC
c651422 Add dts bundling This adds a "small" d.ts bundler script. This script is very basic, using Node printing to produce its output. Generally speaking, this is inadvisable as it completely disregards name shadowing, globals, etc. However, in our case, we don't care about the globals, and we can opt to restructure our codebase in order to avoid conflict, which we largely had to do anyway when we were namespaces and everything was in scope. 07 November 2022, 21:35:48 UTC
4139807 Add build via esbuild This configures the existing build tasks to use esbuild by default. If using the plain files is desired, passing `--bundle=false` will build using plain files and still produce a runnable system. This is only a basic build; a more efficient build is provided later when gulp is replaced by hereby. 07 November 2022, 21:34:44 UTC
36e2944 Get codebase building pre bundling This isn't totally complete, but enough to get everything building and tests running manually. The next commit will make the build work fully. 07 November 2022, 21:34:44 UTC
6dfa429 Remove typescriptServices, protocol.d.ts, typescript_standalone.d.ts This is the same as TypeScript PR 51026. 07 November 2022, 21:34:44 UTC
01e5200 Convert require calls to imports Although the existing require calls would work fine, it's more consistent to make them actual imports and let them be converted at compile/bundle time. It also lets us emit ESM if needed. There are still conditional requires present for things like the node System, but that's a more difficult problem to solve. 07 November 2022, 21:34:44 UTC
d12116d Fix all internal JSDoc comments If these are regular comments, then they won't appear in our d.ts files. But, now we are relying on an external d.ts bundler to produce our final merged, so they need to be present in the "input" d.ts files, meaning they have to be JSDoc comments. These comments only work today because all of our builds load their TS files from scratch, so they see the actual source files and their non-JSDoc comments. The comments also need to be attached to a declaration, not floating, otherwise they won't be used by api-extractor, so move them if needed. 07 November 2022, 21:34:44 UTC
231fa27 Add JSDoc eslint rule See the next commit for a more fleshed-out description. 07 November 2022, 21:33:08 UTC
8bd5e54 Undo changes needed to load codebase into ts-morph 07 November 2022, 21:33:08 UTC
39e27fb Fix up linting, make lint clean Now that we are modules, there's no reason to ban multiple namespaces per file; each file is its own scope and declaring a namespace won't merge it into any other files. 07 November 2022, 21:33:07 UTC
180554c Make processDiagnosticMessages generate a module 07 November 2022, 21:33:07 UTC
d5274a9 Add gitlens settings suggestion While GitHub automatically uses this file if present, GitLens in VS Code does not. Add the right option to our example settings.json for those who use the extension. Unfortunately, you can't leave this enabled if you want to look at the repo _without_ the file; git blame just crashes when the file isn't present. I'm not sure that there's a workaround for that. 07 November 2022, 21:33:07 UTC
5f5ccc9 Generated module conversion step - .git-ignore-blame-revs 07 November 2022, 21:33:07 UTC
07758c0 Generated module conversion step - inlineImports This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol". 07 November 2022, 21:33:07 UTC
b6c0538 Generated module conversion step - stripNamespaces This step converts each file into an exported module by hoisting the namespace bodies into the global scope and transferring internal markers down onto declarations as needed. The namespaces are reconstructed as "barrel"-style modules, which are identical to the old namespace objects in structure. These reconstructed namespaces are then imported in the newly module-ified files, making existing expressions like "ts." valid. 07 November 2022, 21:32:03 UTC
9a0b85c Generated module conversion step - explicitify This step makes all implicit namespace accesses explicit, e.g. "Node" turns into "ts.Node". 07 November 2022, 21:29:05 UTC
94724a8 Generated module conversion step - unindent This step makes further commits look clearer by unindenting all of the top level namespaces preemptively. 07 November 2022, 21:28:13 UTC
7698653 Explicitly reference ts namespace in tsserverlibrary 07 November 2022, 21:27:19 UTC
df89c74 Make a few changes to allow all code to be loaded as one project 07 November 2022, 21:27:19 UTC
d83a5e1 Fix nightly post-#50528 merge (#51432) 07 November 2022, 21:15:51 UTC
a329210 Fixed a regression with discriminating unions based on a union property against `undefined` with `strictNullChecks: false` (#49648) * Fixed a regression with discriminating unions based on a union property against `undefined` with `strictNullChecks: false` * Add additional test case from the issue comment 07 November 2022, 20:17:59 UTC
7b0df1f Pass in information for the module name resolution when resolutions from file are partially used (#49738) * Test showing wrong resolution is returned because of incorrect mode calculation Test for #48229 * Pass in information for the module name resolution when resolutions from file are partially used Fixes #48229 * Make the resolution info complete 07 November 2022, 19:51:04 UTC
fa4b49d fix(51374): ts(80004): Quick fix... > Annotate with type from JSDoc :: object types (#51378) * fix(51374): transform JSDocTypeLiteral * add additional tests * add additional tests 07 November 2022, 19:35:08 UTC
eac566b Enables passing `--declaration`, `--emitDeclarationOnly`, `--declarationMap`, `--soureMap` and `--inlineSourceMap` to `tsc --build` (#51241) * Add different tests for baselining before behavior * Fix assert for first project output * Add ability to pass declaration, declarationMap, emitDeclarationOnly, sourceMap and inlineSourceMap on commandline of --build * Store these options in --out scenario * Store buildInfo program for --out even if not composite * Changes to make these commanline options work * Do not include sourceMapUrl text in the sourceFile version * Emit complete program in --out scenario as well since we need to determine uptodate ness * Copy js or dts bundle from old build if emitting only js or dts files * Dont emit dts if we want to emit only js files even though options suggest emitting d.ts files as well * Adding comments and refactoring some of the code 07 November 2022, 18:53:22 UTC
896b922 Update package-lock.json 07 November 2022, 06:07:32 UTC
9371edc Update package-lock.json 06 November 2022, 06:06:54 UTC
354891c Avoid unnecessary buildInfo read if host supports caching it (avoids in --build scenario) and some reporting cleanup (#51403) * Emit diagnostics when just manipuating bundle at that time itself [4:04:42 PM] Updating output of project '/TypeScript/src/tsserver/tsconfig.json'... Memory used: 581215K transformTime time: 0.01s Source Map time: 0.35s commentTime time: 0.00s printTime time: 0.58s Emit time: 0.90s I/O Write time: 0.01s Total time: 0.90s * Pull out getSourceFile and writeFile in a function * Fix incorrect solutionPerformance reporting in watch mode * Remove unnecessary build info read when host can give cached buildInfo * Simplify overloads * Accept API change 05 November 2022, 02:19:57 UTC
f0216e3 Improve reduction of similar intersections in type inference (#51405) * Change criteria for reducing intersections in type inference * Add regression test 05 November 2022, 00:04:05 UTC
f1d62f4 Change watchdog tagged users (#51411) 04 November 2022, 22:23:08 UTC
5e3fa9b There is no use of creating reference map with --out since its not used anyways (#51379) * Convert some of the tests to baselines * There is no use of creating reference map with --out since its not used anyways. The changes to affectedFileList returned should be intended since --out needs saving just one file for correct output and not both 03 November 2022, 22:30:32 UTC
7cf842b Enum unification and improvements (#50528) * Fix enum classification and evaluation * References in literal enums must be to other enum members * Accept new baselines * Unify enum types + template literal constant expressions * Accept new baselines * Fix fourslash tests * Fix new compiler errors * Fix lint error * Accept new API baselines * Fix test * Better error message + consistently check enum initializers * Accept new baselines 03 November 2022, 18:05:42 UTC
5a40875 Update package-lock.json 03 November 2022, 06:07:44 UTC
610ae68 Serialize and use files that can be emitted as affectedFilesPendingEmit (#51364) 02 November 2022, 21:55:37 UTC
8ed84e1 Write original fileInfo when its not just string = version = signature in readable baseline (#51391) 02 November 2022, 20:55:20 UTC
3568eba fix test baseline 02 November 2022, 20:46:32 UTC
6017625 do not report use-before-declaration error in async IIFE initializer (#50199) 02 November 2022, 18:41:04 UTC
46b015f Fixed the issue with some longer variadic tuples with `any` rest being incorrectly assignable to shorter variadic tuples (#50218) 02 November 2022, 18:35:17 UTC
fdcb2ff Fix services' type's `isLiteral` implementation (#50929) * fix services' type's isLiteral * update literal completions tests * remove booleans from literals 02 November 2022, 18:28:10 UTC
c1e9afd Update package-lock.json 02 November 2022, 06:10:57 UTC
8efa88f Update package-lock.json 01 November 2022, 06:12:36 UTC
4d15bb1 Fix #50869, only cache calculated type for non-context sensitive parameters (#50976) * Fix #50869, only cache calculated type for non-context sensitive parameters * Simplify check, update comment 01 November 2022, 00:24:51 UTC
c49c733 Bump version to 5.0. 31 October 2022, 20:42:28 UTC
7c58011 Set impliedNodeFormat on sourceFile we get from host to ensure the field is set correctly (#50977) * Add test that fails * Handle impliedNodeFormat when handling sourceFileCache Fixes #50872 * Revert the fix * Make sure impliedNodeFormat is set for the sourceFile * Revert "Make sure impliedNodeFormat is set for the sourceFile" This reverts commit 651a47fdd6ea200e59fdf150dfa913230a86653a. * Revert "Revert the fix" This reverts commit 5c98b9cfc1f275877d8d57a60f8f28a5c8d08157. * Swap the keys for map 31 October 2022, 18:26:36 UTC
cfa55f1 Fixes the tests that got disabled when generating config set es2016 expecting to find libFile and remove incorrect affects flag from listFilesOnly (#51243) * Fix the existing test * Remove affectsEmit from listFilesOnly 31 October 2022, 17:15:19 UTC
18f559f Store array only if dtsOnly emit is pending to compress buildinfo (#51246) 31 October 2022, 17:14:22 UTC
e50bb07 Update package-lock.json 31 October 2022, 06:07:50 UTC
e5cd686 Update package-lock.json 30 October 2022, 06:07:26 UTC
8d40dc1 Update package-lock.json 29 October 2022, 06:07:05 UTC
5cfb3a2 Only call return() for an abrupt completion in user code (#51297) 28 October 2022, 22:36:40 UTC
a7a9d15 Fix for broken baseline in yieldInForInInDownlevelGenerator (#51345) 28 October 2022, 20:56:53 UTC
7f8426f fix for-in enumeration containing yield in generator (#51295) 28 October 2022, 19:09:10 UTC
back to top