23 Commits

Author SHA1 Message Date
Oleksandr T
c981c9ba5a
fix(47597): ignore commented imports following template expression (#47657) 2022-03-15 15:28:49 -07:00
Sheetal Nandi
221a2aeb1b
Handle import type and export type in preprocess (#37508)
Fixes #37338
2020-03-23 10:11:01 -07:00
Andrii Dieiev
c6cfd66fa8
Support template literals in preProcess (fixes #33680) (#33688) 2020-03-12 15:50:23 -07:00
Ron Buckton
ec0af20f5a Merge branch 'master' into libReference 2018-05-29 14:13:00 -07:00
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
Ron Buckton
698f229bb4 Merge branch 'master' into libReference 2018-05-09 11:41:13 -07:00
Andy
7fb7eecf2c
Add telemetry for open JS files (#23833)
* Add telemetry for open JS files

* Send event every time

* Keep stats even for closed files

* Remove tsCheckCountForOpenFilesTelemetry

* Use 'info.path'

* Update API
2018-05-09 07:51:46 -07:00
Ron Buckton
a089297ca3 Add 'lib' reference support 2018-05-04 15:51:13 -07:00
Mohamed Hegazy
f0057f9a33
Remove condition 2018-04-16 11:48:04 -07:00
Joscha Feth
a3311edb4a revert change 2018-04-15 11:30:37 +10:00
Joscha Feth
4dc9db1e70 detect nested non-imports 2018-04-15 11:27:51 +10:00
Joscha Feth
c64c1c9395 fix up 2018-04-15 03:30:47 +10:00
Joscha Feth
f4fa2eb28e
undefined instead of null 2018-04-15 01:51:01 +10:00
Joscha Feth
02b8160b41 store lastToken 2018-04-15 01:23:27 +10:00
Joscha Feth
ee429ef2ea use state 2018-04-13 11:39:29 +10:00
Joscha Feth
4da2e5eda3 fix: do not match MySymbol.import("mod") 2018-04-12 19:31:07 +10:00
Wesley Wigham
32c63a2628
Add support for transpiling per-file jsx pragmas (#21218)
* Add support for per-file jsx pragmas

* Add error for using jsx factory pragma with fragments

* More tests, use different regex class for pragma capture

* Unify all pragma parsing machinery
2018-02-26 16:10:00 -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
2a70bf5158 Don't count a write-only reference as a use (#17752)
* Don't count a write-only reference as a use

* Split isWriteAccess to isWriteOnlyAccess and isReadOnlyAccess

* Update "unusedParameterUsedInTypeOf" to use "b"

* Update diagnostic messages: "is never used" -> "its value is never read"

* Use a WriteKind enum

* Rename enum and move documentation to enum members
2017-09-13 09:02:33 -07:00
Andy
e7dc2a67ca Enable "object-literal-shorthand" lint rule (#16987) 2017-07-07 07:26:58 -07:00
Kanchalai Tanglertsampan
7d2d35d0bf Include dynamic import during pre-processing needed by VS 2017-06-08 14:31:44 -07:00
Ron Buckton
feedb6ccff Make preProcessFile public again 2016-09-08 15:23:50 -07:00
Andy Hanson
4d6bd9df72 Break many functions out of services.ts and into their own modules. 2016-09-07 09:22:11 -07:00