Commit Graph
29498 Commits
Author SHA1 Message Date
Nathan Shively-SandersandGitHub c8e2f58ec5 Completions for asserts and declare (#36355)
* Add completions for `asserts`

* Add declare assertions.
2020-01-22 10:43:33 -08:00
OrtaandGitHub 5e59eece34 Adds support for showing default exports in the navtree (#35477)
* Adds support for showing default exports in the navtree - Fixes #34601

* Handle the feedback in #35477

* Navigation items using default export or export = will get noted if they are a const vs function
2020-01-22 08:13:04 -05:00
Alexander TandDaniel Rosenwasser 38eccbab2a feat(29624): better errors for non-exported types (#36187) 2020-01-21 13:03:22 -08:00
Klaus MeinhardtandSheetal Nandi 342f4c0b54 forceConsistentCasingInFileNames affects module resolution (#36334) 2020-01-21 12:45:13 -08:00
Daniel Rosenwasser 8976ac96aa Update LKG. 2020-01-21 12:35:42 -08:00
Klaus MeinhardtandSheetal Nandi 1fbe20fe75 resolveJsonModule affectsModuleResolution (#36290)
* resolveJsonModule affectsModuleResolutionFixes: #36251

* fix lint
2020-01-21 11:49:38 -08:00
Klaus MeinhardtandSheetal Nandi bc1e7728df experimentalDecorators and emitDecoratorMetadata affect builder state (#36297)
* experimentalDecorators and emitDecoratorMetadata affect builder state

* better test
2020-01-21 11:28:55 -08:00
Klaus MeinhardtandSheetal Nandi 2dd21a08f5 useDefineForClassFields affects emit (#36308)
* useDefineForClassFields affects emit

* fix lint
2020-01-21 11:28:04 -08:00
Yacine HmitoandSheetal Nandi 4445e1147c Fix isProgramUpToDate when changing rootFileNames (#36011) 2020-01-21 11:26:17 -08:00
OrtaandGitHub f588c78aab Remove the compiler diag 1360 after it got missed in #35751 (#36332) 2020-01-21 11:54:48 -05:00
Wenlu WangandDaniel Rosenwasser d2c5d54242 remove duplicate message (#36125) 2020-01-18 14:00:53 -08:00
Alexander TandDaniel Rosenwasser 0dd4c9cebe feat(36231): Improve message for "Remove declaration for: ..." (#36283) 2020-01-18 13:28:19 -08:00
Ron BucktonandGitHub 50adabe32d Improve diagnostics and add code fixes for top-level await (#36173) 2020-01-18 12:24:08 -08:00
Alexander TandDaniel Rosenwasser afa11d3c7a fix(34621): show suggestions in class property initializer (#35999) 2020-01-17 14:27:12 -08:00
Alexander TandDaniel Rosenwasser 94e8db7e07 fix(35043): TS Server: references does not mark isDefinition o… (#36051) 2020-01-17 14:26:36 -08:00
Alexander TandDaniel Rosenwasser ce4c4b6183 fix(36023): fix crash in document highlight service (#36233) 2020-01-17 14:24:46 -08:00
Sheon HanandSheetal Nandi 96e8fbc657 Fix for issue #32528: Prevent meta property from appearing twice (#35844)
* fix meta property from appearing twice

* handle case where ImportMeta has props defined

* rename file

* use exclude instead of exact

* undo comment

* this file should have no change

* change file name back

* add more test cases

* remove comment and text validation

* fix formatting
2020-01-17 13:56:50 -08:00
Anders HejlsbergandGitHub 1a10e712e6 Improve variance measurement (#36261)
* No covariance default for recursive references in variance measurement

* Add tests

* Accept new baselines
2020-01-17 11:50:38 -08:00
csigsandGitHub e2e1f6fd85 LEGO: Merge pull request 36253
LEGO: Merge pull request 36253
2020-01-16 20:10:43 -08:00
csigs 70ba8512bb LEGO: check in for master to temporary branch. 2020-01-17 04:10:10 +00:00
Sheetal NandiandGitHub 57925d4e35 Instead of checking if file exists before file read, handle exceptions from file read (#36244)
Fixes #36236
2020-01-16 17:24:03 -08:00
Anders HejlsbergandGitHub 8517df6fa2 Fix erroneous optional chain narrowing (#36145)
* Not all optional chains are narrowable references

* Add regression test
2020-01-16 16:49:51 -08:00
Sheetal NandiandGitHub b2a7d42032 Handle untitled files from vscode which are of format: untitled:^Untitled-1 (#36240)
* Test for #36200

* Handle dynamic files by vscode
Fixes #36200
2020-01-16 15:38:55 -08:00
Andrew BranchandGitHub 797c5362a2 Codefix: Don’t return a fixId if there’s definitely nothing else that can be fixed (#35765)
* Start fixing fixId

* Fix tests

* Add comment

* Fix unit tests, remove fixAllDescription when unavailable

* Add codeFixAllAvailable to fourslash harness
2020-01-16 10:07:37 -08:00
Alexander TandNathan Shively-Sanders eeff036519 fix(35954): Change spelling for private field incorrectly fixes to a string property (#36079)
* fix(35954): code fix incorrectly fixes private properties spelling issues

* remove duplicate function calls
2020-01-16 09:01:21 -08:00
Alexander TandNathan Shively-Sanders dbd55b3928 fix(35944): show spell checking quick fix for non-existent private named property access (#36195) 2020-01-15 16:56:40 -08:00
Andrew CaseyandGitHub f99072593d Move individual duration properties into a performanceData object (#36210) 2020-01-15 16:48:00 -08:00
Klaus MeinhardtandSheetal Nandi f220e62ce7 importsNotUsedAsValue affects semantic diagnostics (#36001)
* importsNotUsedAsValue affects semantic diagnostics

* add tests
2020-01-15 15:08:16 -08:00
Andrew BranchandGitHub 81a942e7b9 Fix completions triggered on existing private identifier property access (#36191) 2020-01-15 13:13:11 -08:00
Andrew CaseyandGitHub a9cbea4259 Use fs.existsSync to check for cancellation (#36190)
Unlike statSync, it doesn't throw if the file doesn't exist, saving both
time and allocations.
2020-01-15 12:53:40 -08:00
Anders KaseorgandAndrew Casey 64704a160d sys: Use readdir withFileTypes option to skip lots of stat syscalls (#35286)
This makes walking large directory trees much more efficient on Node
10.10 or later.

See:
https://lwn.net/Articles/606995/
https://www.python.org/dev/peps/pep-0471/
https://github.com/nodejs/node/pull/22020
https://nodejs.org/en/blog/release/v10.10.0/

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2020-01-15 12:42:38 -08:00
OrtaandGitHub 1dafd09a06 Revert "Add related diagnostic to "used before defined" if type is a function that returns a union with undefined (#33171)" (#35751)
This reverts commit be960fa356.
2020-01-15 12:50:52 -05:00
Klaus MeinhardtandRyan Cavanaugh 6e3ab1529f remove private named properties from rest and spread types (#35950)
* remove private named properties from rest and spread types

Fixes: #35943

* code review
2020-01-14 14:47:39 -08:00
Alexander TandWesley Wigham daf786ecd0 throw an error when no default export present (#35815) 2020-01-14 11:38:48 -08:00
Wesley WighamandGitHub 91ffa1c752 Update LKG (#36164) 2020-01-13 13:11:29 -08:00
Wesley Wigham 08014bca05 Fix lints 2020-01-13 12:50:20 -08:00
Wesley WighamandGitHub 69ab1d5ecd Handle Identifier declarations in getDeclarationSpaces (#36136) 2020-01-13 10:29:37 -08:00
Sheetal NandiandGitHub 76ee0214f9 Use watch invoked with node_modules/.staging as watch for refreshing complete node_modules, so that npm install is reflected correctly (#36039)
* Add test that demonstrates npm install watch behaviour some times

* Use watch invoked with `node_modules/.staging` as watch for refreshing complete node_modules, so that npm install is reflected correctly
Fixes #35966
2020-01-10 14:58:01 -08:00
Sheetal NandiandGitHub 0c3019e3b3 Handle invalid package.json typings fields when generating specifiers (#36137)
Fixes #35437
2020-01-10 14:51:23 -08:00
Sheetal NandiandGitHub 00b21efcb0 Remove the check that if base file name starts with ^ is dynamic file name since those files can exist (#36109)
Fixes #35734
2020-01-10 10:57:44 -08:00
Nathan Shively-SandersandGitHub 13cddae3f7 Allow references to uninitialized ambient properties (#36112)
Previously these were incorrectly treated just like normal properties:

```ts
class Parent {
    a: any;
    constructor(arg: any) {
        this.a = arg;
    }
}
class Child extends Parent {
    declare a: number;
    constructor(arg: number) {
        super(arg);
        console.log(this.a);  // Property 'a' is used before being assigned. (2565)
    }
}
```

Fixes #35327
2020-01-10 10:50:05 -08:00
Anders HejlsbergandGitHub 357f715382 Check combined intersection properties against target index signatures (#35143)
* Check combined intersection properties against target index signatures

* Add tests

* Accept new baselines

* Less aggressive check for index signatures

* Track intersection membership state for both source and target

* Minor fixes
2020-01-10 10:46:10 -08:00
Nathan Shively-SandersandGitHub 517d6eea28 Get jsdoc host from chained assignment (#36111)
* Get jsdoc host from chained assignment

getSourceOfAssignment previously only checked one level of binary
expression instead of following binary expressions all the way to the
right. This meant that binding of `@constructor` would fail in the
following example:

```js
/** @constructor */
a = b = function () { }
```

* cleanup lint

* use existing utility
2020-01-10 10:09:39 -08:00
Anders HejlsbergandGitHub 94271aa753 Remove CFA discriminant check restrictions (#36114)
* Remove unnecessary containsMatchingReferenceDiscriminant logic

* Accept new baselines
2020-01-10 09:41:16 -08:00
Jean PierreandNathan Shively-Sanders 79dcd3dba1 Correctly resolve tags for function overloads (#30253)
* Correctly resolve tags for function overloads. Fixes #30181

* Better fix for #30181. Added more unit tests

* Fix commentsOverloads tests

* Fallback to first signature when doc and tags are empty
2020-01-10 08:54:26 -08:00
M.YoshimuraandNathan Shively-Sanders 5fc917be2e Fixes broken emit with useDefineForClassFields + private field (#35898)
* Fixes broken emit with useDefineForClassFields + private field

* use simpler function for condition
2020-01-09 10:21:49 -08:00
Nathan Shively-SandersandGitHub 66b5c47854 Fix crash in codefixes re: braces of class body (#36087)
* Fix crash in codefixes re: braces of class body

Previously, the code that finds braces of a class body assumed they were
always there. This is not always the case, so this code checks for
that.

* fix semicolon lint
2020-01-09 08:46:00 -08:00
TypeScript BotandNathan Shively-Sanders 21316e551a Update user baselines (#36046) 2020-01-08 16:44:13 -08:00
Anders HejlsbergandGitHub 0aab63b7ff Fix narrowing of optional chains (#36089)
* Check for definitely not undefined instead of maybe not undefined

* Fix comment

* Add tests
2020-01-08 15:37:27 -08:00
Titian Cernicova-DragomirandRyan Cavanaugh 3e4578c9f4 Fixed unreported strict property initialization violations. (#35891) 2020-01-08 15:15:20 -08:00