437 Commits

Author SHA1 Message Date
Yui
f235bf7db8 [Transforms] Merge master 06/06/2016 (#8991)
* Remove check narrowing only certain types, add test showing issues with this

* string literal case test

* Reconcile fix with CFA work

* Defaultable -> NotNarrowable to align with use

* Missed a defaultable in comments

* Add test for narrowing to unions of string literals

* Rewrite isInStringLiteral to accomodate for unterminated strings

* Refactor signatureHelp to expose helper functions

* Add support for completion in string literals

* Remove unused check

* Use const instead of let

* Fix error

* Formatting changes

* Use shorthand properties

* Add failing test for #8738

* Sort baseline reference identifier by name

* Detects assignment to internal module export clause, fixes #8738

* add SharedArrayBuffer

fix

* Factor out assignment op check

* Add test for composite assignment

* Factor out the behaviour and handles x++ and ++x

* Handles ES3 default as identifier name

* Fix missing else statement

* isNameOfExportedDeclarationInNonES6Module

* Reorder options alphabetically

* Mark diagnostics, and skipDefaultLibCheck as internal

* Allow an import of "foo.js" to be matched by a file "foo.ts"

* Improve loadModuleFromFile code

* Respond to PR comments

* Respond to more PR comments

* Fix test

* Actually merge from master

* Revert to old tryLoad implementation

* Run fixupParentReferences when parsing isolated jsDocComment

* initial revision of unit test support for project system in tsserver

* Allow wildcard ("*") patterns in ambient module declarations

* Add non-widening forms of null and undefined

* Create separate control flows for property declarations with initializers

* Add regression test

* Allow trailing commas in function parameter and argument lists

* Add tests

* Remove unused variable

* Add null check and CR feedback

* Support shorthand ambient module declarations

* Revert "Merge pull request #7235 from weswigham/narrow-all-types"

This reverts commit ef0f6c8fe4f94a7e294cfe42d7025c9dca6535d5, reversing
changes made to 9f087cb62ade7a879e23c229df752fc8f87d679c.

* reuse the fixupParentReferences function

* Improve typing of && operator with --strictNullChecks

* Add test

* Respond to PR comments

* Respond to PR comments

* Add merging tests

* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`

* Update tests

* Fix mistake

* Include indent in navigation bar protocol

Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.

* Remove unnecessary restrictions in property access narrowing

* Fix fourslash test

* Add regression test

* Consider property declarations to be control flow containers

* Adding regression test

* Remove restriction on --target es5 and --module es6

* change type definition for Object.create

* Fix signature help

* Add "implicit any" warning for shorthand ambient modules

* Remove trailing whitespace

* Support using string values in enums for CompilerOptions in transpile methods

* Remove trailing whitespace in jakefile

* Make `jake runtests-browser` support test regexes with spaces

For example: `jake runtests-browser t="transpile .js files"` now works.

* Add another test

* factor out isJsxOrTsxExtension

* Move to a conformance test

* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""

This reverts commit fc3e040c5167868ed623612e8f33fb3beedf73b1.

* Use inclusive flag, as originally done, but include almost everything

* Add additional tests

* Respond to PR comments

* Fix typo

* add tests for tsserver project system

* Fix test

* Allow case comparison to undefined and null in strict null checking mode

* Remove incorrectly added tests

* check if moduleResolution when verifying that program can be reused

* more tests for module resolution change and exclude

* Fix linting issues

* Merge JSDoc of assignments from function expressions

* Allow nested assignments in type guards

* Add tests

* Improve order of parameter's merged jsdoc

* Force LF newlines for LKG builds/non debug builds
Fixes 6630

* Create intersection types in type guards for unrelated types

* Split commentsFunction test into expr/decl

And renumber.

* Remove TODO comments

* Accept new baselines

* Add tests

* Remove comments

* Fix test helper

* Recognize relative path using in outDir property (#9025)

* Recognize relative path using in outDir property

* Add projects tests

* Add project .json files

* Update baselines

* Add comments

* Add test case

The test passes in 1.8 and fails in master.

* Return trace when exception happens

* Remove Long-Done TODO

AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).

* Allow primitive type guards with typeof on right

Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.

* Primitive type guards are now order independent

* Fix comments in tests

* Add handleing for classes

* Add more tests for target=es5 module=es6

* addExportToArgumentListKind

* Accept baseline

* Add more tests

* wip-fixing transforms

* Adds progress indicators to the runtests-parallel build task.

* Fixed typo

* Fix comment

* Add test for out-of-range error

* Use proper method of not resolving alias

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Port 8739

* Update tests

* Update baselines

* Contextually type return statement in async function

* Remove stale files

* Undo change

* Improve perf

* Improve tests

* Fix sourcemaps for debugging tests

* Allow --sourceRoot with --inlineSources option
Fixes #8445

* this in parameter initializers resolves to class

Accept baselines now that the test passes.

* Add tests for more kinds of import/export

* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)

* Error when using async modifier in function-expression and arrow-function when target es5

* Add tests and baselines

* Resolve function-this in parameter initialisers when explicitly provided

* Allow null/undefined guard with null/undefined on left

Also add a test with baselines.

* Code review comments

* Update more diagnostic messages ES6->2015

Fix #8996 CC @mhegazy.

* Fixes an issue with runtests-parallel when global mocha is not installed.

* Update LKG

* Add tests

* fix baselines

* Recommend runtests-parallel in CONTRIBUTING

* Only inlineSourceMap when debugging through jake-browser (#9080)

* Only inlineSourceMap when debugging through jake-browser

* Address PR: fix typo in opt's property

* Manually port tests from PR 8470

* minor fix: add missing return clause

* Support using string values in enums for CompilerOptions in transpile methods

* Support using string values in enums for CompilerOptions in transpile methods

# Conflicts:
#	tests/cases/unittests/transpile.ts

* Fix test helper

* Add test for out-of-range error

* Fix module loading error

(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)

* Use camel-case instead of snake-case (#9134)

* Manually add tests for PR 8988

* Allow wildcard ("*") patterns in ambient module declarations

* Respond to PR comments

* Add another test

* Improve perf

* Improve tests

* Update baseline from merging with master

* Address PR comment

* Update baseline

* Refactor how we retrieve binding-name cache in module transformer

* Temporary accept so we get a clean run-tests result
2016-06-14 11:36:57 -07:00
Ron Buckton
cfa4388822 Replace legacy emitter with tree transforming emitter. 2016-06-07 10:32:03 -07:00
Ron Buckton
7783cb9790 Merge branch 'transforms' into transforms-merge 2016-05-27 16:38:40 -07:00
Ron Buckton
3c6ceaf85e Simplified performance timers 2016-05-26 18:25:11 -07:00
Ron Buckton
ee39c4e8d4 Merge branch 'master' into transforms-merge 2016-05-25 14:14:32 -07:00
Ryan Cavanaugh
7173fa8d02 Merge pull request #8670 from RyanCavanaugh/fix8275
Automatically consume @types/ folders
2016-05-24 15:23:06 -07:00
Ron Buckton
96ba0f2696 Added metrics for printing 2016-05-24 11:41:14 -07:00
Ryan Cavanaugh
f7cc05482b Don't lose host 'this' 2016-05-23 16:25:25 -07:00
Ryan Cavanaugh
27292e4292 Merge pull request #8678 from RyanCavanaugh/fix8255
Tweak UMD / global semantics
2016-05-23 16:15:56 -07:00
Ryan Cavanaugh
3ee4a2283f Lint 2016-05-23 15:47:04 -07:00
Ryan Cavanaugh
1c253239e6 Refactor 2016-05-23 14:51:39 -07:00
Ryan Cavanaugh
41290db9c6 Tweak UMD semantics 2016-05-18 17:59:43 -07:00
Mohamed Hegazy
167c3fbc64 Fix typo 2016-05-18 17:12:59 -07:00
Mohamed Hegazy
d73dd06e4b Respond to code review comments 2016-05-18 16:37:14 -07:00
Ryan Cavanaugh
58b11b631f Baseline accept and reorder program logic so common source dir is right 2016-05-18 11:30:40 -07:00
Ryan Cavanaugh
f0e3ebe37d Lint 2016-05-18 11:12:02 -07:00
Ron Buckton
abc9fda0e8 Conditionally enable performance metrics 2016-05-17 18:43:13 -07:00
Ron Buckton
b8a9efb66c Wrap performance metrics in object to reduce deoptimizations on ts namespace. 2016-05-17 18:37:08 -07:00
Mohamed Hegazy
02f0065c95 Update error message 2016-05-17 17:15:06 -07:00
Mohamed Hegazy
53f6755907 Add error message if module is not specified and a file contains a module indicator 2016-05-17 17:14:51 -07:00
Ryan Cavanaugh
f4e10eb738 Automatically consume /types 2016-05-17 15:41:31 -07:00
Vladimir Matveev
5e94c76190 expose code path that will use Path type to avoid redundant string conversions 2016-05-10 23:43:26 -07:00
Lucien Greathouse
71e4d4504f Fix minor comment typo 2016-05-09 23:05:57 -06:00
Vladimir Matveev
2b5bbfee60 use CompilerHost.realpath to resolve actual location for symlinks 2016-05-05 13:38:09 -07:00
Sheetal Nandi
76dd2086a4 Report error if user specified --out and we are defaulting to commonjs emit 2016-04-20 11:22:52 -07:00
Nathan Shively-Sanders
f8ab1a5ca6 Merge branch 'master' into transforms 2016-04-18 13:27:33 -07:00
Vladimir Matveev
54862a27e2 fix typo in message 2016-04-13 21:36:36 -07:00
Vladimir Matveev
e7a4dd4cf5 added validation of paths option 2016-04-13 21:16:39 -07:00
Vladimir Matveev
376c493e67 include type reference directives in .d.ts. files 2016-04-11 21:36:07 -07:00
Vladimir Matveev
1a85c5f54c fix issue with optionality of CompilerHost 2016-04-10 20:42:22 -07:00
Vladimir Matveev
e5e7d47782 merge with origin/master 2016-04-08 14:38:47 -07:00
Paul van Brenk
58efc2ee05 Merge pull request #7883 from Microsoft/listEmittedFiles2
Add option to list the emitted files as part of the compiler output.
2016-04-07 17:50:26 -07:00
Ron Buckton
1aa69921c6 Makes transforms the default 2016-04-07 17:07:12 -07:00
Ron Buckton
3507ed021c Fixes issues that were causing runtests-browser to fail 2016-04-07 16:13:28 -07:00
Paul van Brenk
88a8992ce3 CR Feedback 2016-04-07 15:29:11 -07:00
Yui
f0a996e6fb Fix rwc (#7895)
* Fix RWC

* Fix RWC

* Addres PR
2016-04-07 11:17:43 -07:00
Vladimir Matveev
46d28f16cc added supports for 'types' compiler option 2016-04-06 13:49:25 -07:00
Paul van Brenk
5363b2d7ad Add option to list the emitted as part of the compiler output.
This is useful for incremental build scenarios.
2016-04-06 13:25:29 -07:00
Vladimir Matveev
e2a23fd598 remove compilationRoot parameter, use typesRoot/config file location as a root when computing primary locations 2016-04-05 16:33:11 -07:00
Vladimir Matveev
ecbbe02c53 addressed PR feedback 2016-04-05 11:28:50 -07:00
Vladimir Matveev
25e9226d25 addressed PR feedback 2016-04-04 18:03:36 -07:00
Mohamed Hegazy
523529cc55 Use isWatchSet to test for options.watch 2016-04-04 14:51:16 -07:00
Mohamed Hegazy
f1f6317a59 Merge branch 'vilic-master' 2016-04-04 11:23:45 -07:00
Mohamed Hegazy
4b5618bd60 Merge branch 'master' of https://github.com/vilic/TypeScript into vilic-master 2016-04-04 11:23:30 -07:00
Vladimir Matveev
a4f30ff2a7 removed unused type assertions in harness 2016-04-01 21:26:39 -07:00
Vladimir Matveev
aaaa9c0895 expose type reference resolution for external consumption 2016-04-01 12:41:01 -07:00
Ryan Cavanaugh
75922c4056 Address CR 2016-04-01 12:19:40 -07:00
Ryan Cavanaugh
05444eaabb Support reference library directives 2016-04-01 12:19:16 -07:00
Kanchalai Tanglertsampan
b9cd882ae7 Address PR: use getDefaultLibLocation to get directory 2016-03-30 10:26:39 -07:00
Kanchalai Tanglertsampan
7e1470d5d4 Address PR: use getDefaultLibLocation? insteadof getUserDefinedLibFileName 2016-03-28 16:24:16 -07:00