523 Commits

Author SHA1 Message Date
Anders Hejlsberg
12f5dd85d7 Introduce --strictFunctionTypes mode 2017-09-18 06:33:47 -07:00
Wesley Wigham
27f9cdb1ae Explicitly avoid canonicalizing paths during configuration handling (#18316)
* Explicitly avoid canonicalizing paths during configuration handling

* Extract usage of identity in commandLineParser into single function, use identity in checker
2017-09-07 15:54:24 -07:00
Wesley Wigham
72cbc12c9a Allow undefined/null to override all parameters (#18058) 2017-09-06 22:08:42 -07:00
Wesley Wigham
d03d1074ee Make compiler options which map to a flag case-insensitive again (#17755) 2017-08-11 19:59:43 -07:00
Andy
f64b8ad902 Add "preserveSymlinks" option (#16661)
* Add "preserveSymlinks" option

* Respond to PR comments
2017-08-11 10:03:21 -07:00
Andy
85f59098d3 validateSpecs: Use array helpers (#17275)
* validateSpecs: Use array helpers

* Make filter predicate smaller

* forEach -> for-of
2017-08-08 11:38:41 -07:00
Ron Buckton
b747c2dd96 exclude node_modules unless explicitly included 2017-08-03 18:48:27 -07:00
Andy
e515151ba4 Remove unnecessary MapLikes in commandLineParser (#17324)
* Remove unnecessary `MapLike`s in commandLineParser

* Fix typo

* Inline knownKeysCount
2017-07-25 14:19:17 -07:00
Andy
c1375d5422 generateTSConfig: Remove unnecessary variable (#17330) 2017-07-25 13:30:48 -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
f0bd91c314 Convert Array to ReadonlyArray/Push in commandLineParser.ts (#17323) 2017-07-21 07:16:22 -07:00
Andy Hanson
2ce23909b2 Fix error message 2017-07-17 12:39:01 -07:00
Andy Hanson
96d537bc54 readFile may return undefined 2017-07-14 15:57:23 -07:00
Andy
08030c7d02 Convert most of core.ts to accept ReadonlyArray (#17092)
* Convert most of core.ts to accept ReadonlyArray

* Fix lint

* Fix isArray
2017-07-11 17:39:33 -07:00
ikatyang
a79240fbc6 Add missing docs for module: 'none' in tsc --init 2017-07-07 18:25:22 +08: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
Nathan Shively-Sanders
2eec7f3565 Dedupe some utility code
1. convertToArray is a duplicate of arrayFrom
2. inferFromParameterTypes delegates immediately to inferFromTypes
3. One usage of arrayFrom instantiated a whole iterator only to take the
first element, which is the same as calling `next`.
2017-06-30 09:23:00 -07:00
Andy
179a3e10b5 Handle depth in all readDirectory implementations (#16646) 2017-06-29 11:04:33 -07:00
Oleg Mihailik
b60f936b14 Enquote undefineds. 2017-06-20 22:54:50 +01:00
Sheetal Nandi
09f0b3471a Merge branch 'master' into ownJsonParsing 2017-06-15 09:59:37 -07:00
Anders Hejlsberg
dc28aaa132 Add --noStrictGenericChecks compiler option 2017-06-12 13:09:01 -07:00
TravCav
b57830f7f9 enforcing curly braces (#16315) 2017-06-07 11:58:25 -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 ccc60c8b3b75476c4b11abb6ab4d2e6f06214f8f.
2017-06-05 17:16:29 -07:00
Sheetal Nandi
c4ad151a46 Merge branch 'master' into ownJsonParsing 2017-06-05 17:01:09 -07:00
Mohamed Hegazy
ccc60c8b3b Revert "[Master] wip-dynamic import" (#16264) 2017-06-05 10:49:20 -07:00
Sheetal Nandi
d680720f6d Merge branch 'master' into ownJsonParsing 2017-06-05 10:28:23 -07:00
Yui T
1729ea8609 Update command line 2017-06-04 21:18:52 -07:00
Yui T
e386d65ed6 Use ESNext instead of ES2018 2017-06-04 19:58:24 -07:00
Yui T
2f476bf22f Merge branch 'master' into master-dynamicImport 2017-06-02 09:10:20 -07:00
t_
6e49237d31 Remove trailing whitespace from tsconfig.json (#16197)
* Remove trailing whitespace from tsconfig.json

* Simplify
2017-06-01 13:43:44 -07:00
Sheetal Nandi
8d771ca044 Merge branch 'master' into ownJsonParsing 2017-05-30 13:03:23 -07:00
Sheetal Nandi
7db76edbae Always return empty object when converting the json sourcefile into actual json object, allowing to continue compilation even if there are errors in the tsconfig files 2017-05-30 11:37:26 -07:00
Sheetal Nandi
7bd9e092ac Make configFile on compiler options as non enumerable 2017-05-26 17:15:57 -07:00
Andy
d052bb83ca Add project telemetry (#16050)
* Add project telemetry

* Respond to some PR comments

* Wrap event in a TelemetryEvent payload

* Replace paths with empty string instead of removing them entirely

* Add "version" property to payload

* Add telemetry for typeAcquisition settings

* Add "files", "include", "exclude", and "compileOnSave"

* Convert typingsOptions include and exclude to booleanss

* Add "extends", "configFileName", and "projectType"

* configFileName: Use "other" instead of undefined

* Add "languageServiceEnabled" telemetry
2017-05-25 13:30:27 -07:00
Sheetal Nandi
f1ea38d127 Merge branch 'master' into ownJsonParsing 2017-05-24 12:46:29 -07:00
Kanchalai Tanglertsampan
faab927c8d Merge branch 'master' into master-dynamicImport
# Conflicts:
#	src/compiler/checker.ts
#	src/compiler/emitter.ts
#	src/compiler/parser.ts
#	src/compiler/transformers/module/module.ts
#	src/compiler/transformers/module/system.ts
2017-05-24 11:26:06 -07:00
Donald Pipowitch
f309996b32 added es2017.intl (#15369) 2017-05-24 09:50:38 -07:00
Sheetal Nandi
ea60e9966d Get configFiles as part of file names 2017-05-15 16:07:08 -07:00
Sheetal Nandi
c97b389b07 Simplifying the json conversion notifier 2017-05-11 11:08:03 -07:00
Sheetal Nandi
d7e9609ae5 Merge branch 'master' into ownJsonParsing 2017-05-11 09:10:35 -07:00
Andy Hanson
a7457871a6 Merge branch 'master' into config-extension 2017-05-08 11:00:58 -07:00
Yui T
feb41f7d7c Merge branch 'master' into master-dynamicImport
# Conflicts:
#	src/compiler/diagnosticMessages.json
#	src/compiler/program.ts
2017-04-26 15:35:30 -07:00
Sheetal Nandi
3f7b53e0cd Use base tsconfig's compileOnSave option if tsconfig.json doesnt have it specified
Fixes #13910
2017-04-18 14:10:58 -07:00
Sheetal Nandi
6f568b3f26 Merge branch 'master' into ownJsonParsing 2017-04-17 13:40:49 -07:00
Andy
af64ef8b67 Merge pull request #15141 from Microsoft/getOwnKeys
Remove unnecessary use of getOwnKeys
2017-04-14 11:47:54 -07:00
Andy Hanson
8c559a4f08 Respond to PR comments 2017-04-12 15:11:16 -07:00
Andy Hanson
893e3242fb Don't access sys.newLine inside unit tests 2017-04-11 14:24:32 -07:00
Andy Hanson
4ae8df635a Remove unnecessary use of getOwnKeys
Also, fix a typo.
2017-04-11 14:19:11 -07:00
Andy Hanson
92bea77ad3 Tsconfig inheritance: Do not resolve included files in an inherited tsconfig 2017-04-11 14:05:57 -07:00