36 Commits

Author SHA1 Message Date
Andy
e53e56cf82
Enable '--strictNullChecks' (#22088)
* 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
2018-05-22 14:46:57 -07:00
Ryan Cavanaugh
3ca1d2d7e3 Remove all reference comments from server/ 2018-04-11 15:38:26 -07:00
Andy
b3edc8f9f4
Apply 'no-unnecessary-type-assertion' lint rule (#22005)
* Apply 'no-unnecessary-type-assertion' lint rule

* Fix type error

* Fix tsconfig.json

* Add --format back
2018-02-16 18:38:00 -08:00
Sheetal Nandi
ecddf8468f Fix the assert for undefined leaf in LineNode (#21924)
Fixes #21818
2018-02-16 16:37:32 -08:00
Andy
d2fd137d88
Add a getFullText() helper method to IScriptSnapshot (#21155)
* Add a `getFullText()` helper method to `IScriptSnapshot`

* Use a function instead of a method
2018-01-12 10:44:39 -08:00
Andy
6f2ba15446
Start linting for double spaces (#20820)
* Start linting for double spaces

* Code review

* Fix cases that were excluded by countDoubleSpaces

* Remove extraneous closing parenthesis
2018-01-08 08:52:13 -08:00
Andy
f67a9ba96e
Apply 'interface-name' lint rule (#19695) 2017-11-02 17:20:18 -07:00
Sheetal Nandi
10ea5bf460 Script infos while opening/closing shouldnt mark project as dirty if the contents dont change 2017-08-31 09:13:59 -07:00
Andy
b8c37bb50c Inline childFromLineNumber and childFromCharOffset (#17018)
* Inline childFromLineNumber and childFromCharOffset

* Handle empty document -- root node with 0 children

* Fix test
2017-08-09 13:43:25 -07:00
Andy
bd68122821 scriptVersionCache: Export less (#17202)
* scriptVersionCache: Export less

* Remove LineIndexForTest, use LineIndex

* Add /* @internal */ to class LineIndex

* Make CharRangeSelection a const enum
2017-08-09 10:59:10 -07:00
Andy
d2ec45f354 Remove unnecessary 'ts.' qualifications (#17163) 2017-07-13 13:08:59 -07:00
Andy
38db79d666 buildTreeFromBottom: Really simplify loop (#17105) 2017-07-12 09:59:29 -07:00
Andy
1408109487 buildTreeFromBottom: simplify loop (#17091) 2017-07-11 09:40:02 -07:00
Andy
b8b1fb305a Minor cleanups in scriptVersionCache (#17021) 2017-07-10 15:10:45 -07:00
Andy
e29b2106e9 Improvements to LineIndex.edit (#17056) 2017-07-10 15:08:57 -07:00
Andy
91d7b22e6a Remove ILineInfo type (#17017) 2017-07-10 11:35:54 -07:00
Andy
e4a69174db LineNode.add: return value never used (#17016) 2017-07-07 14:00:09 -07:00
Andy
31ce6cfba6 Minor cleanups to ScriptVersionCache (#16983) 2017-07-07 10:49:59 -07:00
Andy
ee48c1b4cc Minor cleanups to EditWalker (#16980) 2017-07-07 10:36:46 -07:00
Andy
d3f4447657 Minor cleanups to LineIndexSnapshot (#16981) 2017-07-07 10:35:21 -07:00
Andy
81f8151e3a Use 'push' and 'pop' methods instead of using array.length (#16979) 2017-07-07 10:22:59 -07:00
Andy
ba53b42663 Clean up findChildIndex (#16984) 2017-07-07 10:15:04 -07:00
Andy
e7dc2a67ca Enable "object-literal-shorthand" lint rule (#16987) 2017-07-07 07:26:58 -07:00
Arthur Ozga
7e03429a8e enforce triple-equals 2017-04-04 15:51:13 -07:00
Kagami Sascha Rosylight
2a941a7222 inline length 2016-12-20 03:12:35 +09:00
Kagami Sascha Rosylight
27a60e4580 fix linting errors 2016-12-18 15:44:54 +09:00
Vladimir Matveev
dda24f6d70 allow to compute change ranges only for snapshots from the same script version cache 2016-12-14 14:43:45 -08:00
Vladimir Matveev
7da3383504 do not use ScriptVersionCache for closed files (#12777) 2016-12-08 16:17:42 -08:00
Andy Hanson
6814c1d883 Forbid unused locals/parameters anywhere 2016-10-19 08:27:49 -07:00
Vladimir Matveev
92b63fa725 Merge pull request #11550 from Microsoft/vladima/generate-protocol
Automatically generate protocol.d.ts by pulling in necessary dependencies
2016-10-12 14:18:19 -07:00
Zhengbo Li
3c4786d542 fix 9610 (#11042) 2016-09-21 16:52:02 -07:00
Vladimir Matveev
39c948ad34 merge with origin/master 2016-07-13 16:20:08 -07:00
Vladimir Matveev
a9ba0a5585 use circular buffer instead of unbounded array 2016-07-12 18:48:41 -07:00
Vladimir Matveev
cefaa171eb [in progress] project system work - major code reorg 2016-06-24 14:30:45 -07:00
Vladimir Matveev
c9b82eddda [in progress] project system work 2016-06-21 17:31:54 -07:00
Vladimir Matveev
34aa907988 move script version bits into the separate file 2016-05-31 16:51:00 -07:00