Commit graph

1190 commits

Author SHA1 Message Date
Sheetal Nandi 865b3e7862
Merge pull request #27172 from Microsoft/moduleResolutionWithOutDir
Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
2018-09-18 14:33:33 -07:00
Sheetal Nandi 4c047254e6 Ensure all the usages of compilerOptions.declaration take into account compilerOptions.composite if needed. 2018-09-18 13:53:16 -07:00
Sheetal Nandi 0d5aeeef22 Detect the input file of referenced project with fileNames from parsed command
Fixes #25864 and #26054
2018-09-18 11:44:16 -07:00
Sheetal Nandi 7852cf7ed3
Merge pull request #27175 from a-tarasyuk/bug/error-using-declaration-dir-with-composite
#26862: allow using declarationDir with composite option
2018-09-18 10:53:38 -07:00
Alexander T 5b5af23b41 use getEmitDeclarations helper 2018-09-18 14:46:42 +03:00
Alexander T d11117829d allow using declarationDir with composite option 2018-09-18 14:38:48 +03:00
Alexander T c510df1a53 deny using allowJs option with composite 2018-09-18 12:41:30 +03:00
Sheetal Nandi d51b8d940c Use originalFileName (fileName of input project reference file) to resolve module/typereferences/reference paths in it instead of output decl file path
This also ensures that originalFileName, resolvedPath are set correctly even when we are reusing program structure
Fixes #26036
2018-09-17 19:00:30 -07:00
Ryan Cavanaugh 8ca01dfc9f
Merge pull request #26851 from ajafff/assert-compilerhost-readdirectory
Assert CompilerHost.readDiretory for projectReferences with include
2018-09-17 16:13:08 -07:00
Sheetal Nandi a5fd3e9176 Handle out and outFile options correctly in tsbuild 2018-09-17 12:46:10 -07:00
Sheetal Nandi b6129b452f Fix the project reference verification to include json source file version check 2018-09-17 12:18:59 -07:00
Sheetal Nandi aac961e60d Builder to use project reference redirects to output in the dependencies instead of source files 2018-09-17 12:18:59 -07:00
Andy a57467a317
Fix bugs: Replace SourceFile if '--noUnusedLabels' changed (#27060)
* Fix bugs: Replace SourceFile if '--noUnusedLabels' changed

* Use properties on CommandLineOptionBase

* Handle "alwaysStrict" and better categorize options

* Properly handle "strict"

* Code review

* fix test
2018-09-17 10:53:48 -07:00
Sheetal Nandi e4718564e5
Merge pull request #27082 from Microsoft/watchAPIAndProjectReferences
Fix tsc watch and watch API for a project that has project references
2018-09-14 17:58:42 -07:00
Sheetal Nandi d6ffdde059 Revert the API change to resolveProjectReferencePath introduced in #27062 2018-09-14 13:32:23 -07:00
Sheetal Nandi 20f671ede2 PR feedback 2018-09-14 11:07:22 -07:00
Sheetal Nandi 40d33c809a Merge branch 'master' into watchAPIAndProjectReferences 2018-09-14 10:54:07 -07:00
Sheetal Nandi 47f311ac03
Merge pull request #27062 from Microsoft/tsbuildWatchImprovements
Multiple improvements to watching with --build option
2018-09-14 09:54:17 -07:00
Sheetal Nandi ea67e3ac56 Fix watch of project with project references 2018-09-13 15:41:07 -07:00
Nathan Shively-Sanders 64d0e0d448
Shorten more internal names to JS or TS (#27080) 2018-09-13 15:05:57 -07:00
Nathan Shively-Sanders 6bd1da20c9
Rename JS-specific concepts (#26795)
* Rename JS concepts

1. Assignment declaration -- an assignment that is treated like a
declaration. Previously called [JS] special (assignment|declaration),
among other things.
2. Expando -- a value that can be used as a target in assignment
declarations. Currently, a class, function or empty object literal.
Functions are allowed in Typescript, too. Previously called a JS
container, JS initializer or expando object.
3. JavaScript -> Javascript. This is annoying to type, and looks like
'Java Script' in a camelCase world.

Everything is a pure rename as far as I know. The only test change is
the API baselines, which reflect the rename from SymbolFlags.JSContainer
to SymbolFlags.Assignment.

* Remove TODO

* Rename Javascript->JS

Note that this introduces a variable name collision in a couple of
places, which I resolved like this:

```ts
const isInJavascript = isInJSFile(node);
```
2018-09-12 10:44:46 -07:00
Sheetal Nandi a172751bf9 Always resolve the config file to ResolvedConfigFile if its json, otherwise combine tsconfig.json 2018-09-11 13:02:50 -07:00
Daniel Imms 745f5be2cb Invert gutter instead of setting colors
Fixes #26850
2018-09-08 13:26:14 -07:00
Sheetal Nandi 88d5b04c70 Lowercase type reference directives when determining to reuse program structure (just like when we create new program) 2018-09-06 13:26:44 -07:00
Sheetal Nandi ddba6d8a70
Merge pull request #26825 from Microsoft/resolveJsonModuleEmit
Support json module emit when module emit is commonjs, amd, es2015 or esnext
2018-09-06 09:57:47 -07:00
Ryan Cavanaugh f79e64561f
Merge pull request #26870 from ajafff/composite-files-check
better condition for file include exhaustiveness check
2018-09-05 12:32:56 -07:00
Ryan Cavanaugh d265fbf7f7
Merge pull request #26192 from ajafff/createprogram-nochecker
createProgram: don't use TypeChecker
2018-09-05 11:49:57 -07:00
Klaus Meinhardt 239a7b9a4f better condition for file include exhaustiveness check
As `files` always contains declaration files of external libraries, lib files and declaration files from typeRoots, the previous condition evaluated to false for probably all projects out there.
This changes the condition to compare array length after filtering out all declaration files.
That avoids unnecessary work of path normalization in the common case where everything is ok.
2018-09-04 13:35:57 +02:00
Klaus Meinhardt 3806ee7406 Assert CompilerHost.readDiretory for projectReferences with include
Fixes: #26785
2018-09-02 21:42:38 +02:00
Sheetal Nandi e41dbcdccd Support json module emit when module emit is commonjs, amd, es2015 or esnext
Fixes #25755 and #26020
2018-08-31 14:05:14 -07:00
Klaus Meinhardt b2850ee467 remove useless condition 2018-08-30 22:13:39 +02:00
Sheetal Nandi 530a530ac0
Merge pull request #26590 from Microsoft/buildRefactoring
Refactor ts build and report watch status when doing --build --watch
2018-08-28 11:43:35 -07:00
Andy 7223945666
Use array helper in computeCommonSourceDirectory and remove two unnecessary tests (#26416) 2018-08-27 17:03:30 -07:00
Sheetal Nandi cec1b0a717 Report error summary from the queue. 2018-08-21 17:30:51 -07:00
Sheetal Nandi 4193846108 Do not expose change in createCompilerHost 2018-08-21 14:46:00 -07:00
Sheetal Nandi 0c4003e735 Use SolutionBuilderHost instead of using compilerhost for solution builder 2018-08-21 13:41:31 -07:00
Sheetal Nandi 17ee9231b7 Write first test with --build and --watch 2018-08-21 13:41:30 -07:00
Ron Buckton 1de8cd3f62 Emit lib reference directives in declaration output 2018-08-20 16:54:51 -07:00
Sheetal Nandi af71d55a49 Do not include json file unless --resolveJsonModule is specified
Fixes #26402
2018-08-14 16:23:13 -07:00
Andrew Casey daccc978a8 Don't compute suggestion diagnostics for lib files
The check applied to semantic diagnostics (and `checkSourceFile`) should
also apply to suggestion diagnostics.  Fixes assert.
2018-08-07 17:58:35 -07:00
Klaus Meinhardt 6df61272f3 createProgram: don't use TypeChecker
Avoids using the TypeChecker when trying to reuse the Program structure.
This allows SourceFiles contained in the old Program to be updated using ts.updateSourceFile

Fixes: #26166
2018-08-03 17:54:15 +02:00
Sheetal Nandi 46d223dc1b Fixes to ensure getDefinitionAndBoundSpan works correctly when using composite projects
Project references need to be detached from the project when closing project
In SourceMapDecoder handle when the redirected file to project reference is set as the output of the project
Keep configured project alive if project it references has open ref
Fixes #26164
2018-08-02 16:36:50 -07:00
Andy 9c9f3e3cf9
importFixes: When one file redirects to another, consider both for global import specifiers (#25834)
* importFixes: When one file redirects to another, consider both for global import specifiers

* Add test for #26044

* Avoid a symlinked package globally importing itself (fixes another case of #26044)

* Compare to node_modules with getCanonicalFileName
2018-07-31 17:28:56 -07:00
Sheetal Nandi 9196b7db33
Merge pull request #25851 from Microsoft/configFileDiag
Report compiler options errors as well as part of configFileDiag event
2018-07-30 11:07:07 -07:00
Wesley Wigham f6d3ac9b5d
Fix #25820 - handle redirected files when comparing paths (#25902)
* Fix #25820 - handle redirected files when comparing paths

* Update test to do case check
2018-07-24 15:24:52 -07:00
Sheetal Nandi a9d497a008 Report compiler options errors as well as part of configFileDiag event
Fixes #25741
2018-07-20 18:04:08 -07:00
Alexander T 8ae163a1cc Merge branch 'master' of https://github.com/Microsoft/TypeScript into bug/25667-getmodifiedtime-has-wrong-return-type 2018-07-20 10:18:22 +03:00
Alexander T 37add88b18 Update tests baselines 2018-07-20 10:17:27 +03:00
Klaus Meinhardt 7031c43978 correctly detect if strictNullChecks is enabled
Fixes: #25808
2018-07-20 00:16:59 +02:00
Alexander T bf567b8a40 Change getModifiedTime type 2018-07-16 11:10:09 +03:00
Sheetal Nandi 49ac60f286 Support resolveJsonModule option when files contain the json file
Fixes #25636
2018-07-13 12:21:51 -07:00
Sheetal Nandi 4dc3cd3773 Use getEmitModuleKind to check module generation kind 2018-07-10 15:28:21 -07:00
Sheetal Nandi 3866a5048b Report errors for module generation other than "commonjs" with --resolveJsonModule
Fixes #25517
2018-07-10 15:00:46 -07:00
Ryan Cavanaugh d7ce0eae3a
Merge pull request #25524 from RyanCavanaugh/useGetEmitDeclarations
Use getEmitDeclarations instead of .declarations
2018-07-10 10:59:06 -07:00
Ryan Cavanaugh 72f0789908 Don't crash when an implicit rootDir constraint is violated under composite:true
Fixes #25527
2018-07-09 15:41:15 -07:00
Ryan Cavanaugh 1b1ffe952b Use getEmitDeclarations instead of .declarations 2018-07-09 14:51:40 -07:00
Andy 64555aa6a9
navigateTo: Collect results from all referenced projects. (#25283)
* navigateTo: Collect results from all referenced projects.

* Don't use project references, just source maps

* Move more code to session

* Test when implementation file is deleted

* Use tsserver tests instead of fourslash tests to ensure session is used

* Support find-all-references

* Restore fourslash tests

* Update emit baselines (added missing newline)

* Support rename

* @weswigham code review

* Don't open/close files

* Avoid growing `toDo` too eagerly

* @sheetalkamat code review

* Also get symlinked projects for originalLocation

* Update API (#24966)

* More @sheetalkamat code review

* Remove unnecessary test

* Update API (#24966)
2018-07-05 15:39:03 -07:00
Wesley Wigham 7084e6cf47
Adds related spans and error grouping for duplicate identifier errors (#25328)
* Adds related spans and error grouping for duplicate identifier errors

* Trim trailing whitespace

* Record related info in error baselines

* Make error more whimsical
2018-07-02 10:47:52 -07:00
Wesley Wigham 30db30055f
Fix module specifier case handling for declaration emit (#25110) 2018-06-29 11:02:43 -07:00
Wesley Wigham bd97e12f76
Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host (#25107)
* Multifaceted approach to performantly enabling fileExists outside of the synchronize step in the emit host

* make cache undefinable and handle correctly

* Remove unneeded cast

* Readd assert

* More useful failure messager
2018-06-22 14:05:36 -07:00
Ron Buckton 5bc8f957f1 Address lint warnings 2018-06-19 02:31:03 -07:00
Ron Buckton 891b15f60a Update gulpfile to support project references 2018-06-18 22:45:13 -07:00
Wesley Wigham 640af3f75e
Introduce related spans into tsserver protocol (#24548)
* Introduce related spans into tsserver protocol

* Incorporate pretty output, implement esModuleInterop related span
2018-06-15 10:54:36 -07:00
Wesley Wigham 2a1503610b
Stop generating sectional sourcemaps (#24917)
* 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
2018-06-13 18:52:23 -07:00
Ron Buckton 756e46bfe3 Reuse resolvedProjectReferences 2018-06-11 17:59:32 -07:00
Ryan Cavanaugh 5804905ca6 Jakefile rewrite WIP 2018-06-10 13:23:16 -07:00
Ryan Cavanaugh 856fc79ae7 Lint 2018-06-05 16:28:42 -07:00
Ryan Cavanaugh 5111f4d541 Move proj ref logic to the right place 2018-06-05 16:20:07 -07:00
Ryan Cavanaugh cf87bd446d Merge branch 'master' into tsbuild 2018-06-05 14:55:51 -07:00
Wesley Wigham d9b93903c0
Use more nodelike paths for import types when possible (#24610)
* 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
2018-06-05 12:54:36 -07:00
Ryan Cavanaugh 45842a0c34 Merge remote-tracking branch 'weswigham/sourcemap-concatenation-station' into tsbuild 2018-06-05 12:31:32 -07:00
Ron Buckton fbeb58a147
Merge pull request #23893 from Microsoft/libReference
Adds 'lib' reference directives
2018-06-04 16:14:52 -07:00
Ron Buckton 666841264c Merge branch 'master' into libReference 2018-06-04 14:38:56 -07:00
Wesley Wigham 7eaa78846e
Visit the children of an import type/require call/dynamic import when looking for those (#24663) 2018-06-04 14:31:56 -07:00
Ryan Cavanaugh 9b0dc37f42 Merge branch 'fixMissingScriptInfo' into tsbuild 2018-06-04 10:59:42 -07:00
David Sherret 7e0ed5ec4d Fix createProgram js docs. 2018-06-01 23:29:05 -04:00
Ryan Cavanaugh 7e9e29ce64 Store + use the resolved path of sourceFiles in proj. ref. scenarios 2018-06-01 13:20:57 -07:00
Sheetal Nandi b0f039c9e2 Make suggestion diagnostics to wire cancellationToken
This especially needed if its a js file without the ts-check, the file wont be typechecked in getSemanticDiagnostics
Fixes part of #19458
2018-05-31 10:47:17 -07:00
Ron Buckton 7de55fbb7e PR Feedback 2018-05-31 09:50:51 -07:00
Wesley Wigham 8adbf85e0e
Candidate sectional sourcemap emit implementation 2018-05-30 17:53:26 -07:00
Ron Buckton ec0af20f5a Merge branch 'master' into libReference 2018-05-29 14:13:00 -07:00
Ryan Cavanaugh fe191fec6d Merge branch 'master' into tsbuild 2018-05-29 13:14:12 -07:00
Ryan Cavanaugh 19ab8abbb9 Fix strictNullChecks breaks 2018-05-24 13:42:12 -07:00
Sheetal Nandi 51058b56e5 Do not trigger invalidation if emitted file is in declarationDir 2018-05-24 13:36:52 -07:00
Ryan Cavanaugh 8936b030cd Merge branch 'master' into tsbuild 2018-05-24 13:01:58 -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
Andy 7106a587cc
Add type for diagnostics where location is defined (#23686)
* Add type for diagnostics where location is defined

* getSemanticDiagnostics may return global diagnostics

* Reduce array creation
2018-05-22 11:01:18 -07:00
Ryan Cavanaugh 7e0825a3e7 Clean, etc 2018-05-21 17:47:58 -07:00
Ron Buckton 698f229bb4 Merge branch 'master' into libReference 2018-05-09 11:41:13 -07:00
Alex Ryan 01351d43e4
Fix comment typo in program.ts 2018-05-08 14:36:32 -07:00
Wesley Wigham 8ab5be9a86
Add hook for adding transforms into the declaration emit pipeline after the main one (#23946)
* Add hook for adding transforms into the declaration emit pipeline after the main one

* Fix lint
2018-05-08 11:20:48 -07:00
Ryan Cavanaugh ffa0ccba2a Project References Core support 2018-05-07 15:12:50 -07:00
Ron Buckton 68c0e524a6 Accept new symbol baselines, ensure expected ordering for default libs 2018-05-04 17:23:56 -07:00
Ron Buckton 8d230fc428 Fix typo in comment 2018-05-04 15:51:13 -07:00
Ron Buckton a089297ca3 Add 'lib' reference support 2018-05-04 15:51:13 -07:00
Sheetal Nandi 4e6586deb8 PR feedback 2018-05-04 10:45:46 -07:00
Sheetal Nandi 15f9ea3d14 Merge branch 'master' into requireJson 2018-05-03 15:35:54 -07:00
Ron Buckton 56648ad0f1
Merge pull request #20763 from Microsoft/vfs
Update harness to use single robust virtual file system for tests.
2018-05-03 10:25:20 -07:00
Armando Aguirre 1d593fd81e
Merge pull request #23191 from armanio123/AddVueSupport
Added deferred ScriptKind and renamed JsFileExtensionInfo to FileExte…
2018-05-02 18:13:34 -07:00
Ron Buckton d62a11ffc0 Merge branch 'master' into vfs 2018-05-01 18:58:31 -07:00
Ron Buckton 1dff0af646 More path cleanup 2018-05-01 18:53:54 -07:00
Mohamed Hegazy 2c956af927
Merge pull request #23664 from a-tarasyuk/feature/strictPropertyInitialization-can-not-be-used-without-strictNullChecks
Add warn that user can not use --strictPropertyInitialization without --strictNullChecks
2018-04-30 12:10:54 -07:00
Sheetal Nandi 579748bc2b Merge branch 'master' into requireJson 2018-04-30 11:44:09 -07:00
Daniel Rosenwasser 9672116d8c Merge remote-tracking branch 'origin/master' into importDotMeta 2018-04-25 22:21:56 -07:00
Alexader a20e59cae4 Add warn that user can not use --strictPropertyInitialization without --strictNullChecks 2018-04-24 21:48:46 +03:00
Andy 5c94bef0e1
Add 'renameFile' command to services (#23573)
* Add 'renameFile' command to services

* renameFile -> getEditsForFileRename

* Support `<reference path>` directives
2018-04-20 13:43:09 -07:00
Wesley Wigham 238ed7a94c
Visit EOF to collect jsdoc import types (#23521)
* Visit EOF to collect jsdoc import types

* Add flag to prevent jsdoc import types from influencing compilation set
2018-04-18 19:52:34 -04:00
Armando Aguirre 9923003ee6 Merge branch 'master' into AddVueSupport 2018-04-16 13:45:34 -07:00
Sheetal Nandi ce08af4dfe Merge branch 'master' into requireJson 2018-04-13 15:26:16 -07:00
Ryan Cavanaugh df95de3231 Merge branch 'master' into referencesDogfood_1 2018-04-11 16:17:38 -07:00
Ryan Cavanaugh 8294259ec2 Remove all reference comments from compiler/ 2018-04-11 15:38:26 -07:00
Andy a004571d3e
Update outdated comments (#23320) 2018-04-11 07:56:42 -07:00
Daniel Rosenwasser 9e2bbb6f8a Basic parsing/emitting support for 'import.meta'. 2018-04-10 12:55:43 -07:00
Armando Aguirre 50eb512566 Added deferred ScriptKind and renamed JsFileExtensionInfo to FileExtensionInfo 2018-04-05 17:30:04 -07:00
Sheetal Nandi a14396320b Resolve json modules only when --resolveJsonModule is specified 2018-04-05 15:37:13 -07:00
Sheetal Nandi 9f724156be Merge branch 'master' into requireJson 2018-04-05 15:18:21 -07:00
Mohamed Hegazy e6fa4e4415
Merge pull request #23043 from alan-agius4/feature/compiler-host-falsy-file
fix: `CompilerHost.getSourceFile` is being called for odd filenames
2018-04-02 17:08:31 -07:00
Alan Agius 7e482b27fb fix: CompilerHost.getSourceFile is being called for odd filenames besides the one being compiled
Ignore falsy file names from `getDefaultLibraryFileName`

Closes: #13629
2018-04-02 20:58:37 +02:00
Wesley Wigham 414bc49cc4
Module or import types (#22592)
* 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
2018-04-02 10:18:23 -07:00
Andy 5cef6274c3
Remove duplicate helper function (#23001) 2018-03-29 15:43:31 -07:00
Sheetal Nandi a0fe072fa7
Merge pull request #22613 from Microsoft/configFileErrors
Make config file parsing errors available through program and expose API
2018-03-29 13:08:03 -07:00
Wesley Wigham 6af764c560
Declaration maps and transparent goto definition using them (#22658)
* 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
2018-03-26 12:15:34 -07:00
Wesley Wigham a909000b62
Parse and check type arguments on JSX opening and self-closing tags (#22415)
* Parse and check type arguments on JSX opening like elements

* Fix nits
2018-03-22 15:07:36 -07:00
Sheetal Nandi b4e0062b41 Merge branch 'master' into requireJson 2018-03-16 14:46:34 -07:00
Andy 28ff6b6ef3
Store import nodes in SourceFile.imports instead of StringLiteral nodes (#22495)
* Store import nodes in SourceFile.imports instead of StringLiteral nodes

* Change SourceFile#imports storage back

* Code review

* StringLiteral -> StringLiteralLike
2018-03-16 14:01:00 -07:00
Sheetal Nandi 7329eb1ab1 Make sure config file parsing errors are available through program
Fixes #22570, #21940
2018-03-15 14:58:50 -07:00
Sheetal Nandi 2d9af0b95c Merge branch 'master' into requireJson 2018-03-09 16:51:05 -08:00
Martyn Janes bcf6e342f1 Fix typo in emitDeclarationOnly error message for declaration required 2018-03-09 22:37:10 +03:00
Sheetal Nandi 2071466420 Merge branch 'master' into requireJson 2018-03-08 13:24:59 -08:00
Andy fa4619c5c1
Add 'info' diagnostics (#22204)
* Add 'info' diagnostics

* Code review
2018-02-28 11:16:32 -08:00
Sheetal Nandi 4257c2fa04 Resolve the .json file only if module name contains the extension 2018-02-23 17:27:17 -08:00
Sheetal Nandi a790a92f7d Parse all json values at root 2018-02-23 14:00:30 -08:00
Sheetal Nandi ca590d6fed Need allowJs to be true to use the json module resolution 2018-02-23 14:00:23 -08:00
Sheetal Nandi ee2e267d38 Replace usage of jsonObject on JsonSourceFile 2018-02-23 13:59:47 -08:00
Sheetal Nandi 5771adbbe7 Resolve Json file when module resolution strategy is node 2018-02-23 13:54:39 -08:00
Alex Eagle 2e66e74e14 fix --pretty output when context is multi-line
Fixes #22097
2018-02-22 22:56:00 -08: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
Mohamed Hegazy 8f8fec433e
Rename switch --emitDeclarationsOnly to --emitDeclarationOnly (#21651)
* Rename `--emitDeclarationsOnly` to `--renameDeclarationOnly`

* Rename test files
2018-02-05 14:48:50 -08:00
AdityaDaflapurkar 39d78b7a2b Fix minor typos in documentation (#21538) 2018-02-01 10:58:31 -08:00
Sheetal Nandi cf540198e6 Always get diagnostics when emitting irrespective of whether its declaration only emit
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
2018-01-31 16:22:27 -08:00
Sheetal Nandi 76bf470072 Simplify isEmittedFile check instead of iterating through all source files.
Fixes #21459
2018-01-29 15:50:58 -08:00
Manoj Patel afc588eb9e --emitDeclarationsOnly flag to enable declarations only output (#20735)
* Add emitOnlyDeclarations flag

* Fix name

* verifyOptions checking logic

* Passing tests

* doJsEmitBaseline

* Tests !!!
2018-01-25 15:35:18 -08:00
Sheetal Nandi ed23ca582a Merge branch 'master' into builderApi 2018-01-17 16:11:44 -08:00
Andy b363f4f9cd
Log packageId in --traceResolution (#21233) 2018-01-17 11:41:23 -08:00
Sheetal Nandi 5bd3f97b18 Merge branch 'master' into builderApi 2018-01-16 11:14:39 -08:00
Sheetal Nandi 69bb5ea8f0 Do not trigger the failed lookup location invalidation for creation of program emit files
Handles #20934
2018-01-11 12:34:58 -08:00
Wesley Wigham 7e6315075d
Synthesize namespace records for proper esm interop (#19675)
* 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
2018-01-08 16:36:23 -08:00
Sheetal Nandi 5bc78afcbb Merge branch 'master' into builderApi 2018-01-08 13:01:09 -08:00
Klaus Meinhardt 7ef541ca1f findConfigFile can return undefined (#20556) 2018-01-04 16:56:29 -08:00
Orta 5865494453 Switch the pretty output to use colons to separate file:line:char so that lines are clickable in terminals (#20736) 2018-01-04 16:38:52 -08:00
Daniel Rosenwasser ccd5608392
Merge pull request #20416 from JoshuaKGoldberg/tell-me-im-pretty
Prettified timestamps and error reports in --pretty
2017-12-19 12:59:35 -08:00
Josh Goldberg b3151707df Converted to enum; marked internal 2017-12-19 12:19:39 -08:00
Sheetal Nandi 2611c9b339 Merge branch 'master' into builderApi 2017-12-07 20:23:15 -08:00
Sheetal Nandi 4c21cbf145 Create builderState so that when FilesAffectedBy is only api needed, we arent tracking changed files 2017-12-07 11:47:49 -08:00
Ryan Cavanaugh c15470595f Dedupe local types from ATA and reuse old programs correctly 2017-12-06 13:17:21 -08:00
Sheetal Nandi 43c2610a69 More functions moved from system to WatchCompilerHost 2017-12-05 16:53:34 -08:00
Josh Goldberg 98b64db811 Re-added blue color, with corrected 94m code 2017-12-04 22:28:56 -08:00
Josh Goldberg eb5d8d0dd7 Prettified timestamps and error reports in --pretty
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?
2017-12-02 20:56:35 -08:00
Sheetal Nandi 0b79f4a073 Handle emit only declaration file to always produce declaration file and skip the diagnostics check 2017-11-22 18:37:07 -08:00
Sheetal Nandi 012f12bcbd To handle cancellation token, remove changed/affected files from the changeset only after getting the result 2017-11-22 18:24:53 -08:00
Nathan Shively-Sanders 744760df91 Cache result of isCheckJsEnabledForFile in getSemanticDiagnosticsForFile 2017-11-20 08:34:01 -08:00
Nathan Shively-Sanders eeeefcc10e Report jsdoc errors as semantic errors
This allows reporting of semantic errors as well. Semantic errors are
likely to outnumber syntactic errors, so it's valuable not to block
semantic errors on a few syntactic errors.
2017-11-17 10:38:30 -08:00
Andy 592ee00906
Have CompletionEntryDetails source use a relative path (#19917)
* Have CompletionEntryDetails source use a relative path

* Use getCanonicalFileName from services Instead of creating a new one
2017-11-14 14:26:49 -08:00
Mohamed Hegazy 1de3bbac2e Merge branch 'update-types3' of https://github.com/ajafff/TypeScript into ajafff-update-types3 2017-11-07 15:23:38 -08:00
Ron Buckton 31c3d444f1 Merge branch 'master' into compareStrings 2017-11-03 23:01:51 -07:00
Andy 1d7f449a87
Minor cleanups in pathCompletions.ts (#19685)
* Minor cleanups in pathCompletions.ts

* Update name
2017-11-03 15:06:22 -07:00
Mohamed Hegazy 6c71ca84e7
Add utility function to check for strict option flags (#19427)
* Add utility function to check for strict option flags
- Correctelly check for noImplicitAny in checker
- Correctelly check for noImplicitAny in installTypesForPackage refactor

* Respond to code review comments

* Accept baselines

* Revert "Accept baselines"

This reverts commit cf4ef62830.

* Move type alias to core
2017-10-30 13:05:54 -07:00
Ron Buckton 24437774a8 Further simplification 2017-10-26 11:56:29 -07:00
Ron Buckton 3605e4ef69 Remove unnecessary comment 2017-10-25 18:04:31 -07:00
Ron Buckton c0ed26e605 Simplify comparers 2017-10-25 17:46:39 -07:00
Ron Buckton 130c407708 More control over which collator to use in each situation 2017-10-25 16:30:19 -07:00
Ron Buckton 4d7923af00 Consistent naming 2017-10-24 16:37:41 -07:00
Ron Buckton dee77ced7c Added 'equateStrings' for string equality comparisons (rather than sorting) 2017-10-24 16:14:49 -07:00
Ron Buckton 763d17e947 Manually inline a few cases to reduce repeated 'ignoreCase' conditionals in loops 2017-10-24 14:17:29 -07:00
Sheetal Nandi 7828746cc9 Set the files found during node_modules search correctly when reusing existing program structure
This marks files reused correctly as from external library resulting in not using them for files to be emitted and computed for output structure
Fixes #19327
2017-10-23 19:05:38 -07:00
Klaus Meinhardt 3416e91468 Merge branch 'master' of https://github.com/Microsoft/TypeScript into update-types3 2017-10-22 22:35:21 +02:00
Bill Ticehurst 45ba0ac3b9 Set the scriptKind from the host configuration if present 2017-10-18 10:41:57 -07:00
Sheetal Nandi bce77fdfd9 Merge pull request #18960 from Microsoft/builderHandlesChangeInResolution
Builder handles changes in resolution/references when file's contents dont change
2017-10-11 12:11:44 -07:00
Klaus Meinhardt 9935bc0b2f Merge branch 'master' into update-types3 2017-10-07 00:15:20 +02:00
Sheetal Nandi 03441fe120 Merge branch 'master' into projectRootAsCurrentDirectoryInEmit 2017-10-04 18:48:16 -07:00
Sheetal Nandi bf4ca30bc3 Let builder find out from imports/typereference directives if file references have changed.
This is needed to ensure that the ambient module addition takes effect
Fixes #15632
2017-10-04 18:09:09 -07:00
Mohamed Hegazy ae3f29ade6 Accept baselines (#18903) 2017-10-02 19:08:13 -07:00
Sheetal Nandi 7f969e8138 Making APIs as internal so that we can enable them after we have figured out final details 2017-10-02 16:27:26 -07:00
Sheetal Nandi 835153ba50 PR feedback 2017-10-02 12:22:05 -07:00
Sheetal Nandi 9e08caebf5 Merge branch 'master' into watchImprovements 2017-09-29 10:43:05 -07:00
Daniel Rosenwasser 0ea7c61eb5 Merge pull request #18810 from Microsoft/unusedErrorArgs
Remove unused arguments for diagnostics
2017-09-28 12:51:57 -07:00
Daniel Rosenwasser 76d92a5dd6 Remove unused arguments in program.ts. 2017-09-27 22:04:52 -07:00
Sheetal Nandi fad71d3dc6 Use project root as the current directory whenever possible to create the project 2017-09-27 17:19:54 -07:00
Alex Eagle 9753d3950b --pretty output: move context after the file/error
Fixes #16583
2017-09-27 13:55:30 -07:00
Sheetal Nandi 68d360585a PR feedback 2017-09-26 16:21:15 -07:00
Sheetal Nandi 23acff5bc8 Merge branch 'master' into watchImprovements 2017-09-25 16:18:26 -07:00
Andy 25ad0b5581 Apply "array-type" lint rule (#18699) 2017-09-22 16:14:41 -07:00
Anders Hejlsberg 8f4a2c184c Merge pull request #18457 from Microsoft/tsIgnoreInTSFiles
Suppress errors in .ts files using '// @ts-ignore' comments
2017-09-20 00:56:56 +01:00
Andy 0ae42ea3de Allow relative imports of '.js' files when --noImplicitAny is disabled (#18489)
* Allow relative imports of '.js' files when `--noImplicitAny` is disabled

* Update baselines, and don't ignore a diagnostic about missing JSX
2017-09-19 12:42:29 -07:00
Armando Aguirre b03fbaf313 Merge branch 'master' into FixRenameInDefaultLibrary 2017-09-14 12:01:31 -07:00
Anders Hejlsberg f28d80d7d4 Support '// @ts-ignore' comments in .ts files 2017-09-13 15:40:10 -07:00
Sheetal Nandi b536f9dade Should not remove the reused resolutions in the file when file contents have not changed. 2017-09-12 12:09:06 -07:00
Sheetal Nandi fdb104b242 Merge branch 'master' into watchImprovements 2017-09-11 13:49:36 -07:00
Sheetal Nandi de28d02626 Add test case to verify correct resolution file is picked when current resolution file is not removed but higher precedence file is created 2017-09-08 15:45:47 -07:00
Andy 2e02778960 When loading a module from node_modules, get packageId even in the loadModuleFromFile case (#18185)
* When loading a module from node_modules, get packageId even in the `loadModuleFromFile` case

* Support packageId for <reference types> too
2017-09-07 14:31:20 -07:00
Klaus Meinhardt 4f61eef4c3 Merge branch 'master' of https://github.com/Microsoft/TypeScript into update-types3 2017-09-07 22:14:46 +02:00
Mohamed Hegazy 0637792f1b Merge branch 'master' into update-types3 2017-09-07 12:33:32 -07:00
Daniel Rosenwasser 448d75c08f Merge pull request #17675 from HerringtonDarkholme/master
fix #16567: better coloring on light theme terminal
2017-09-07 12:33:12 -07:00
Wesley Wigham 6695255d86 Allow trailing newline to have fake position (#18298)
* Actually support baselining pretty in the harness

* Test case from 18216

* Use host newline in formatDiagnosticsWithColorAndContext

* Merge statements
2017-09-07 12:26:23 -07:00
Sheetal Nandi 16cf7c40a8 Watch for the automatic types that included as part of type resolution 2017-08-31 09:13:59 -07:00
Sheetal Nandi 4c79033894 Refactoring to watches and caching of system such that we minimize function expressions
Also unified watcher info logging
2017-08-31 09:13:59 -07:00
Andy 4d05bfdf4a moduleAugmentations may contain an Identifier (#18009)
* `moduleAugmentations` may contain an `Identifier`

* Add comment

* Rename function
2017-08-25 15:14:51 -07:00
Andy e2141ad469 Mark some arrays as readonly (#17725)
* Mark some arrays as readonly

* Avoid unnecessary allocations and style changes

* Fix lint
2017-08-24 09:55:01 -07:00
Sheetal Nandi 8deef58fd6 Remove the unused function from the Project since builder has this logic now. 2017-08-18 12:15:03 -07:00
Armando Aguirre 9dd574b1a9 Added host.useCaseSens..., memoized getDefaultLibFileName. 2017-08-15 18:44:28 -07:00
Armando Aguirre 88262dbeb0 Changed check for default library by first checking hasNoDefaultLib, second library path and third name of file. 2017-08-14 18:19:43 -07:00
Armando Aguirre 5b86055786 Excluded the default library from rename service. 2017-08-14 17:58:04 -07:00
Sheetal Nandi 136b091a4a Update based on feedback 2017-08-14 16:34:30 -07:00
Sheetal Nandi 989508245b Updating according to feedback from PR 2017-08-14 12:52:29 -07:00
Sheetal Nandi 59d07dc488 Simplified mutate map options 2017-08-14 11:27:02 -07:00
Sheetal Nandi d0a23bb876 Merge branch 'watchImprovements' into builder 2017-08-12 15:35:30 -07:00
Andy 37b20ee670 For duplicate source files of the same package, make one redirect to the other (#16274)
* For duplicate source files of the same package, make one redirect to the other

* Add reuseProgramStructure tests

* Copy `sourceFileToPackageId` and `isSourceFileTargetOfRedirect` only if we completely reuse old structure

* Use fallthrough instead of early exit from loop

* Use a set to efficiently detect duplicate package names

* Move map setting outside of createRedirectSourceFile

* Correctly handle seenPackageNames set

* sourceFileToPackageId -> sourceFileToPackageName

* Renames

* Respond to PR comments

* Fix bug where `oldSourceFile !== newSourceFile` because oldSourceFile was a redirect

* Clean up redirectInfo

* Respond to PR comments
2017-08-09 14:39:06 -07:00
Herrington Darkholme 0255adc407 fix #16567: better coloring on light theme terminal 2017-08-08 10:12:11 +08:00
Sheetal Nandi 7474ba762c Implementation for invalidating source file containing possibly changed module resolution 2017-08-07 11:31:13 -07:00
Sheetal Nandi 46e3d1c1d9 Refactoring so that instead of just using from tsc --watch the new api is accessible all the time 2017-08-07 11:31:12 -07:00
Sheetal Nandi c814d8e847 Add tests for the tsc --watch 2017-08-07 11:24:07 -07:00
Sheetal Nandi 6237b221da Move the builder to compiler directory 2017-08-07 11:19:52 -07:00
Sheetal Nandi ef5935b52c Initial refactoring so that watch from tsc follows the tsserver projects 2017-08-07 11:19:52 -07:00
Sheetal Nandi 94a589b3bb Program cannot be reused if the missing file is now present
Also dont update filesByName array just to update missing file paths
2017-08-07 11:04:33 -07:00
Sheetal Nandi 273569f6fe Make the host cache store the fileName instead of undefined for the missing host files 2017-08-07 11:04:33 -07:00
Andy f945b26b54 Forbid type assertions in '.js' files (#17503) 2017-07-29 05:41:08 -07:00
Andy eadd084c82 Add 'name' property to Identifier (#17329)
* Add 'name' property to Identifier

* Rename to unescapedText

* Rename 'id.text' to 'id.escapedText'

* Rename 'id.unescapedText' to 'id.text'

* Make escapeIdentifier and unescapeIdentifier do nothing
2017-07-25 13:16:34 -07:00
Andy 53e4040ceb Remove duplicate emptyArrays (#17305) 2017-07-20 06:45:22 -07:00
Daniel Rosenwasser e8421827e0 Merge pull request #16600 from alexeagle/pretty2
Add missing newline in --pretty diagnostics formatter
2017-07-14 12:22:05 -07:00
Andy a0c672ac02 Add assertion that module / type reference names are defined (#17124) 2017-07-12 10:13:33 -07:00
Andy 8c3f5e2208 Remove createFileMap (#16810)
* Make `createFileMap` an internal detail of `program.ts`

* Remove createFileMap

* Clean up calls to `toPath`
2017-07-10 11:24:17 -07:00
Andy 17578e8a5d Use Map<true> for sets (#16972) 2017-07-07 10:34:36 -07:00
Wesley Wigham 4e6b2f3c93 Created a branded type for identifier-escaped strings (#16915)
* Created a branded type for escaped strings

Then flowed it throughout the compiler, finding and fixing a handful of
bugs relating to underscore-prefixed identifiers in the process.
Includes a test for two cases noticed - diagnostics from conflicting
symbols from export *'s, and enum with underscore prefixed member emit.

* Correctly double underscores WRT mapped types

* Add fourslash tests for other fixed issues

* use function call over cast

* Update forEachEntry type accuracy

* Just use escaped names for ActiveLabel

* Remove casts from getPropertyNameForPropertyNameNode

* This pattern has occurred a few times, could use a helper function.

* Remove duplicated helper

* Remove unneeded check, use helper

* Identifiers list is no longer escaped strings

* Extract repeated string-getting code into helper

* Rename type and associated functions

* Make getName() return UnderscoreEscapedString, add getUnescapedName()

* Add list of internal symbol names to escaped string type to cut back on casting

* Remove outdated comments

* Reassign interned values to nodes, just in case

* Swap to string enum

* Add deprecated aliases to escapeIdentifier and unescapeIdentifier

* Add temp var

* Remove unsafe casts

* Rename escaped string type as per @sandersn's suggestion, fix string enum usages

* Reorganize double underscore tests

* Remove jfreeman from TODO

* Remove unneeded parenthesis
2017-07-06 14:45:50 -07:00
Andrew Casey 569ecabb0a Address PR feedback
Make Program.getMissingFilePaths required

Assume getMissingFilePaths always returns a defined value

Make getMissingFilePaths internal

Replace nullable-bool with enum

Update type to reflect possibility of undefined

Use deepEqual to simplify tests

Make condition const

Don't bother cleaning up map before freeing it

Switch from foreach to for-of to simplify debugging

Use a Map, rather than a FileMap, to track open FileWatchers

Fix compilation errors

Introduce and consume arrayToSet

Fix lint warnings about misplaced braces

Delete incorrect comment

Delete from map during iteration

Eliminate unnecessary type annotations
2017-06-29 11:29:19 -07:00
Andrew Casey 4652fc491f Confirm method is defined before calling 2017-06-29 10:39:32 -07:00
Andrew Casey 4863ada22c Track missing files
1. Expose missing files from the `Program`.
2. In `tsc --watch` and `tsserver`, add file watchers to missing files.
3. When missing files are created, schedule compilation (tsc) or refresh
the containing projects (tsserver).
2017-06-29 10:39:31 -07:00
Andy 9013665e22 Replace FileMap with Map where there is no keyMapper (#16724)
* Replace FileMap with Map where there is no keyMapper

* Remove `toKey` and use `keyMapper` directly
2017-06-28 13:15:34 -07:00
Andy 9260a399a3 Remove duplicate switch cases (#16721) 2017-06-28 12:53:43 -07:00
Yui 47c1563649 Merge pull request #16544 from Microsoft/master-fixIncrementalParsingWithDynamicImport
[Master] wip - fix incremental parsing with dynamic import
2017-06-19 16:44:47 -07:00
Alex Eagle 0123bd0e20 Add missing newline in --pretty diagnostics formatter
It was compensated in tsc.ts, but then other compilers are missing a newline.
2017-06-17 09:20:55 -07:00
Sheetal Nandi 09f0b3471a Merge branch 'master' into ownJsonParsing 2017-06-15 09:59:37 -07:00
Yui T a92b549336 Set the structureReused to be safemoudles when dynamic import change 2017-06-14 21:50:12 -07:00
Yui T 1636fbc966 Wip-fix incremental parsing 2017-06-14 17:13:35 -07:00
Andy 09321b3834 Convert Extension to a string enum (#16425) 2017-06-09 19:32:44 -07:00
Daniel Rosenwasser 86e54ac787 Correct pluralization of 'Contain' to 'Contains', made the nodeflag internal. 2017-06-08 16:00:38 -07:00
Sheetal Nandi 48189c883f Merge branch 'master' into ownJsonParsing 2017-06-06 11:03:21 -07:00
Yui T b9017795a0 Revert "Revert "[Master] wip-dynamic import" (#16264)"
This reverts commit ccc60c8b3b.
2017-06-05 17:16:29 -07:00
Sheetal Nandi c4ad151a46 Merge branch 'master' into ownJsonParsing 2017-06-05 17:01:09 -07:00
Andy 8ace7b826f importFixes: Support missing "React" at a JSXOpeningElement (#16066)
* importFixes: Support missing "React" at a JSXOpeningElement

* Fix nextLineRule linting

* Rename to resolveJsxNamespaceAtLocation

* Expose getJsxNamespace and resolveNameAtLocation separately
2017-06-05 14:23:39 -07:00
Andy 70564110c0 Make use of array helper functions (#16226)
* Make use of array helper functions

* Remove unnecessary 'ts.'
2017-06-05 14:11:43 -07:00