Commit graph

1545 commits

Author SHA1 Message Date
Cyrus Najmabadi b363a459ff Add support for semicolons in class bodies 2015-03-31 14:29:45 -07:00
Cyrus Najmabadi f7aaf09603 Add support for parsing and emitting class expressions. 2015-03-31 13:54:43 -07:00
Vladimir Matveev 1bdcaa3d43 added tests for import\export elision 2015-03-31 13:54:33 -07:00
Cyrus Najmabadi a1e18fc22b Introduce a new HeritageClauseElment type.
This type represents the expression+type arguments you can get in a class or interface
heritage clause section.  For class-implements clauses, or interface-extends clauses,
these expressions can only be identifiers or dotted names.  For class extends clauses,
these could be any expressions in the future.  However, for now, we only support identifiers
and dotted names.
2015-03-31 12:29:02 -07:00
Mohamed Hegazy 18d8fedbf5 Expose readConfigFile and parseConfigFile 2015-03-31 10:52:21 -07:00
Mohamed Hegazy cebe42b81f Remove unsed options 2015-03-30 23:32:11 -07:00
Vladimir Matveev 1803d730c2 added initial set of unit tests for separate compilation mode 2015-03-30 23:17:45 -07:00
Mohamed Hegazy 757257b9a1 Ensure export= is emitted correctelly in declaration files 2015-03-30 22:18:13 -07:00
Vladimir Matveev 4b7e6cfc2e addressed CR feedback, accepted baselines 2015-03-30 20:16:50 -07:00
Mohamed Hegazy bea7221174 Ensure we find export default declaration targets if we search for them by name 2015-03-30 16:59:34 -07:00
Yui T c1d9cfe640 Add test for emit destructuring invariable declaration with omitted expression 2015-03-30 16:45:20 -07:00
Yui T 129b8ad8b0 Update baselines from merging with master 2015-03-30 16:28:10 -07:00
Yui T a26368a7d2 Merge branch 'master' into allowDestructuringInAmbient 2015-03-30 14:44:03 -07:00
Yui T 1f055b95aa Emit ommittedExpression in binding pattern 2015-03-30 13:25:46 -07:00
Anders Hejlsberg 6fda0cb561 Accepting new baselines 2015-03-30 02:54:32 -07:00
Anders Hejlsberg 6e169d5bee Merge branch 'master' into exportDefault
Conflicts:
	tests/baselines/reference/es5ExportDefaultFunctionDeclaration.js
	tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js
2015-03-30 02:45:10 -07:00
Anders Hejlsberg 872beeee95 Accepting new baselines 2015-03-30 02:25:47 -07:00
Cyrus Najmabadi 62460aed4b Merge branch 'master' into preserveNewLines3
Conflicts:
	tests/baselines/reference/ES5For-of22.js
2015-03-28 23:45:47 -07:00
Anders Hejlsberg 4894fee7d3 Merge pull request #2514 from Microsoft/simplifyTempLogic
Simplify temporary name generation logic
2015-03-27 10:24:25 -07:00
Cyrus Najmabadi ceeeb9cd11 Always preserve new lines for array and object literals and additional constructs like blocks. 2015-03-26 13:46:35 -07:00
Jason Freeman de8de7ac96 Merge branch 'master' into iteratorSpreadDestructure 2015-03-26 12:26:40 -07:00
Anders Hejlsberg 82b6acaab9 Accepting new baselines 2015-03-26 11:07:28 -07:00
Jason Freeman 7a44b9ed57 Make elaborateErrors persist throughout type relation checks 2015-03-25 19:23:44 -07:00
Jason Freeman 197a42a692 Optimize direct Iterable reference in getIteratedType 2015-03-25 18:38:14 -07:00
Daniel Rosenwasser 77492382ea Updated API baselines. 2015-03-25 18:08:46 -07:00
Jason Freeman e1f2fbff63 Add tests for array destructuring of iterables 2015-03-25 18:04:11 -07:00
Jason Freeman 17d201f922 Use iterated type in checkArrayLiteralAssignment 2015-03-25 18:04:01 -07:00
Jason Freeman 4a0af76064 Add tests for iterator spread in call 2015-03-25 18:03:45 -07:00
Jason Freeman 376574d1be Add tests for iterator spread in an array literal 2015-03-25 18:03:42 -07:00
Jason Freeman b7f2990305 Refactor checkSpreadElementExpression to get the element type internally 2015-03-25 18:03:35 -07:00
Jason Freeman 3497e27d56 Add spread to typeWriter 2015-03-25 18:03:32 -07:00
Jason Freeman abe4076417 Change error message to be more general 2015-03-25 18:03:28 -07:00
Mohamed Hegazy fad889283e Merge branch 'master' into exportEqualsMerged
Conflicts:
	src/compiler/checker.ts
	src/compiler/emitter.ts
	src/compiler/types.ts
	tests/baselines/reference/APISample_compile.js
	tests/baselines/reference/APISample_linter.js
	tests/baselines/reference/APISample_transform.js
	tests/baselines/reference/APISample_watcher.js
	tests/baselines/reference/es5ExportDefaultClassDeclaration2.js
	tests/baselines/reference/es5ExportDefaultFunctionDeclaration2.js
	tests/baselines/reference/es6ExportAllInEs5.js
	tests/baselines/reference/es6ExportClauseWithoutModuleSpecifierInEs5.js
2015-03-25 00:06:38 -07:00
Mohamed Hegazy 1c45b77d9e Merge branch 'master' into exportEqualsMerged 2015-03-24 22:28:35 -07:00
Mohamed Hegazy bc51dd1e77 In ES6 use "export var x" for internal modules and enums instead of an after the fact "export {x};" 2015-03-24 21:54:36 -07:00
Mohamed Hegazy ab5c09a9a6 Make isReferencedAliasDeclaration check children 2015-03-24 21:43:03 -07:00
Mohamed Hegazy 6c40c95313 Disallow export declarations in internal modules 2015-03-24 21:17:11 -07:00
Mohamed Hegazy 27c5d6fa50 use the correct check for import and export specifiers 2015-03-24 20:50:42 -07:00
Mohamed Hegazy 4361e6ea56 Merge branch 'exportEquals' into exportEqualsMerged 2015-03-24 20:32:36 -07:00
Ron Buckton a60d5912a9 Cleanup of duplicate code due to merge 2015-03-24 20:30:03 -07:00
Ron Buckton ea15225a9e Merge pull request #2399 from Microsoft/decorators_min 2015-03-24 19:57:21 -07:00
Cyrus Najmabadi 552d82bc1e Merge branch 'master' into JSLS
Conflicts:
	src/services/services.ts
2015-03-24 18:00:02 -07:00
Cyrus Najmabadi ff2609f251 Merge branch 'master' into javascriptLanguageservice 2015-03-24 17:06:25 -07:00
Ron Buckton f531193557 Updates to emit and updated baselines 2015-03-24 17:00:29 -07:00
Vladimir Matveev 20a0ac5f01 Merge pull request #2476 from Microsoft/immutableBindings
Disallow assignments to imported exports
2015-03-24 15:20:55 -07:00
Vladimir Matveev e5e5ad89fd Merge pull request #2471 from Microsoft/revisedNameGen2
Revised name generation #2, fixes #2449, #2447
2015-03-24 15:20:18 -07:00
Steve Lucco baac6d8a60 Merge pull request #2450 from Microsoft/tsconfigServer
Add support to TypeScript server for tsconfig.json files.
2015-03-24 14:38:26 -07:00
Cyrus Najmabadi c2c44b3ced Merge branch 'findReferences' into javascriptLanguageservice 2015-03-24 14:15:53 -07:00
Cyrus Najmabadi 927e60d592 Merge branch 'master' into findReferences 2015-03-24 14:11:20 -07:00
steveluc 48482071f6 Moved findConfigFile to program.ts. Addressed pull request comments. 2015-03-24 14:03:21 -07:00
Cyrus Najmabadi f583fd451e Merge branch 'completionEntryDetails' into javascriptLanguageservice
Conflicts:
	src/services/services.ts
2015-03-24 13:48:00 -07:00
Vladimir Matveev f0cbcd6782 addressed PR feedback 2015-03-24 12:28:05 -07:00
Yui T 1c2eae6b72 Update test cases 2015-03-24 10:11:29 -07:00
Vladimir Matveev 0fdb2071ce addressed PR feedback 2015-03-24 10:09:33 -07:00
Vladimir Matveev c6f11f39e2 disallow assignments to imported exports 2015-03-23 23:01:27 -07:00
Cyrus Najmabadi 66b3fae09a Remove the active completion session. 2015-03-23 21:44:27 -07:00
Yui T 85624c0321 Change test files name 2015-03-23 17:58:53 -07:00
Anders Hejlsberg 73567756fa Accepting new baselines 2015-03-23 17:03:54 -07:00
Vladimir Matveev 141c96b8f3 revised name generation 2015-03-23 16:16:29 -07:00
Ron Buckton 8dd9b9f2cb Updated check and emit, updated baselines 2015-03-23 14:47:07 -07:00
Mohamed Hegazy d2ead15767 Accept baseline changes 2015-03-23 12:47:39 -07:00
Mohamed Hegazy d47445b175 Merge branch 'exportEquals' of https://github.com/Microsoft/TypeScript into exportEquals 2015-03-23 12:37:41 -07:00
Mohamed Hegazy b9e503d891 Ellide uninstantiated exports in ES6 2015-03-23 12:37:22 -07:00
Yui T 5979dacf4f Correctly emit bidning pattern with initializer and rest 2015-03-23 11:30:51 -07:00
Mohamed Hegazy 86d561d2be Check for instantiation on export default in ES6 2015-03-23 11:17:40 -07:00
Mohamed Hegazy f90253f73e Merge branch 'master' into exportEquals
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/emitter.ts
	tests/baselines/reference/es6ImportDefaultBinding.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingInEs5.errors.txt
2015-03-23 11:06:44 -07:00
Anders Hejlsberg df03c686c4 Accepting new baselines 2015-03-22 12:19:38 -07:00
Anders Hejlsberg f3fb85fa46 Accepting new baselines 2015-03-21 13:18:11 -07:00
Cyrus Najmabadi 9ae0815e21 Treat 0x0085 as whitespace, not as a line terminator. This matches ES5 and ES6. 2015-03-20 16:53:47 -07:00
Cyrus Najmabadi cbeeb519b1 Add a new findReferences API that buckets results with the definition they matched against. 2015-03-20 14:31:36 -07:00
Ron Buckton 0fb624a58b PR feedback 2015-03-19 22:57:03 -07:00
Cyrus Najmabadi 85d71b2883 No emit should happen if there are declaration errors and noEmitOnErrors is specified. 2015-03-19 16:55:07 -07:00
Yui T b5065f1f3a Allow destructuring in ambient context 2015-03-19 14:48:05 -07:00
Yui T 36ea7c8d77 Emit destructuring in parameter 2015-03-19 14:48:02 -07:00
Vladimir Matveev 79272d7cef Merge pull request #2199 from Microsoft/enumCleanup
Fixes #2183, #1797
2015-03-19 11:27:11 -07:00
Vladimir Matveev 371f2df90d Merge pull request #2139 from Microsoft/DtsExports_all
Exports + .d.ts emit
2015-03-18 14:45:05 -07:00
Vladimir Matveev 2ad40c25c9 addressed PR feedback 2015-03-18 14:29:02 -07:00
Mohamed Hegazy 7462915baf Expose setParentNodes on createCompilerHost 2015-03-18 14:11:50 -07:00
Ron Buckton 9761f4b783 PR comment, sourcemap test 2015-03-18 11:17:26 -07:00
Cyrus Najmabadi 7bcd18fe28 Fix diagnostic codes. 2015-03-17 22:56:45 -07:00
Cyrus Najmabadi 9582d7cf28 Add test for pinned comments. 2015-03-17 18:43:39 -07:00
Vladimir Matveev b82fd590d2 merge with master, accept baselines 2015-03-17 18:23:43 -07:00
Ron Buckton ff356cef4c Added sourcemap tests 2015-03-17 18:15:02 -07:00
Vladimir Matveev c38e065b6b do not emit non-exported import declarations that don't have import clause 2015-03-17 18:00:40 -07:00
Vladimir Matveev e4f6f167f6 merge with master, accepted baselines 2015-03-17 17:05:30 -07:00
Ron Buckton 5673400f82 Updated baselines 2015-03-17 15:03:25 -07:00
Ron Buckton f909c6c9f7 Updated baselines 2015-03-17 14:21:13 -07:00
Ron Buckton 6c32a8bdb0 Updated baselines 2015-03-17 14:21:08 -07:00
Ron Buckton efd8a89f69 Diagnostics for decorators 2015-03-17 14:17:24 -07:00
Mohamed Hegazy a06ce61684 Merge branch 'master' into es6ImportExportEmit 2015-03-17 13:03:17 -07:00
Jason Freeman 3879d0ae9a Merge branch 'master' of https://github.com/Microsoft/TypeScript into typeParameterFixing 2015-03-17 10:45:41 -07:00
Mohamed Hegazy 1932f720cb Handel export name bindings in internal modules in ES6 2015-03-16 21:58:57 -07:00
Mohamed Hegazy 3d802438f1 Export classes defined wihtin internal modules correctelly 2015-03-16 21:18:31 -07:00
Mohamed Hegazy 99108694d5 Do not emit "export" for classes within modules, and do not write the name of an export default class 2015-03-16 20:54:28 -07:00
Mohamed Hegazy cb012e01fd Merge branch 'master' into es6ImportExportEmit
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-03-16 20:47:08 -07:00
Vladimir Matveev 74eb96a5b9 correctly merge const enum only and instantiated modules 2015-03-16 19:51:22 -07:00
Vladimir Matveev 9b62c2c407 Merge branch 'master' into DtsExports_all 2015-03-16 19:10:01 -07:00
Vladimir Matveev 218736b23f initial version of declaration emit for default export 2015-03-16 18:54:13 -07:00
Jason Freeman 6fc552339f Merge branch 'master' of https://github.com/Microsoft/TypeScript into typeParameterFixing 2015-03-16 17:43:31 -07:00
Yui c4cb3e3483 Merge pull request #2333 from Microsoft/emitClass
Class emit for ES6
2015-03-16 17:40:03 -07:00
Vladimir Matveev e9ea336771 Merge branch 'master' into DtsExports_all 2015-03-16 16:22:28 -07:00
Yui T 513b45d101 Merge branch 'master' into emitClass
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/emitter.ts
	src/compiler/parser.ts
2015-03-16 15:55:57 -07:00
Yui T 91c5bae6e5 Address code review 2015-03-16 15:41:51 -07:00
Yui T 88933d54cc Address code review 2015-03-16 15:20:40 -07:00
Jason Freeman 28c4b02577 Merge branch 'master' of https://github.com/Microsoft/TypeScript into typeParameterFixing 2015-03-16 14:52:17 -07:00
Mohamed Hegazy 5845d2d214 Merge branch 'master' into es6ImportExportEmit 2015-03-16 14:49:41 -07:00
Mohamed Hegazy 696b688987 Merge branch 'master' into exportDefaultType
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-03-16 14:42:47 -07:00
Yui T 2c7ea7f6b2 Update Baselines 2015-03-16 14:28:29 -07:00
Vladimir Matveev f5a4b0b31a use 'allowGeneratedIdentifiers' to explicitly tell when identifier can be renamed 2015-03-16 12:37:21 -07:00
Mohamed Hegazy 090148fdee Merge branch 'master' into es6ImportExportEmit
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-03-16 12:11:43 -07:00
Jason Freeman bd811cea2a Merge branch 'master' of https://github.com/Microsoft/TypeScript into typeParameterFixing 2015-03-16 11:04:40 -07:00
Jason Freeman 9933f6cd00 Address PR feedback 2015-03-16 11:04:11 -07:00
Yui T 0eeb7ce7b8 Update baselines 2015-03-15 21:40:15 -07:00
Yui T 3bb4b50b4f Update baselines for symbol 2015-03-15 21:35:06 -07:00
Yui T c70385c257 Update baselines 2015-03-15 21:27:54 -07:00
Daniel Rosenwasser ad98fadb0a Merge pull request #2283 from caitp/issue-2282
Disallow line terminator after arrow function parameters, before =>
2015-03-15 21:59:54 -04:00
Mohamed Hegazy c877b1e0a5 Add tests 2015-03-15 18:24:12 -07:00
Mohamed Hegazy c984e81053 Fix issue of the default binding not elided if namedImport is reference
Conflicts:
	src/compiler/checker.ts
	src/compiler/emitter.ts
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportInEs5.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImportWithExport.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingDts.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingInEs5.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBindingWithExport.js
2015-03-15 18:23:48 -07:00
Yui T 9bf5a11bef Update baselines 2015-03-15 16:29:41 -07:00
Mohamed Hegazy b6a6d85e6b Merge branch 'master' into es6ImportExportEmit
Conflicts:
	src/compiler/checker.ts
	src/compiler/emitter.ts
	src/compiler/program.ts
2015-03-15 15:48:23 -07:00
Mohamed Hegazy 44a5343c1e Upate error message 2015-03-15 14:37:12 -07:00
Mohamed Hegazy 7430f3c9c7 Merge branch 'master' into exportDefaultType
Conflicts:
	src/compiler/checker.ts
2015-03-15 14:23:40 -07:00
Vladimir Matveev 3cea68d955 Merge pull request #2353 from Microsoft/shadowingNameViaBindingPattern
consider binding elements as always initialized with doing shadow check
2015-03-15 11:53:42 -07:00
Caitlin Potter 10925c1e9b Make sure arrow function grammar rules can deal with type annotations 2015-03-14 19:51:42 -04:00
Caitlin Potter 5e107e6042 Address slew of review comments 2015-03-14 19:51:41 -04:00
Caitlin Potter aa3cefb63d Check that arrow is on same line as parameters 2015-03-14 19:51:41 -04:00
Caitlin Potter 231f522d89 Add additional test-cases for arrow function grammar
As suggested by @DanielRosenwasser
2015-03-14 19:50:55 -04:00
Caitlin Potter dd16fed21e Perform error reporting in checker 2015-03-14 19:50:55 -04:00
Caitlin Potter 84634ac25d Disallow line terminator after arrow function parameters, before =>
Closes #2282
2015-03-14 19:50:24 -04:00
Jason Freeman a29b6fe8c7 Add tests for type parameter fixing 2015-03-13 18:36:16 -07:00
Jason Freeman df6f856ad5 Persist inference context object throughout the signature, and add isFixed property 2015-03-13 18:32:25 -07:00
Vladimir Matveev a7dac51e84 merge with master 2015-03-13 17:23:42 -07:00
Cyrus Najmabadi 9445b03110 Do not include experimental options in the public API. 2015-03-13 16:56:19 -07:00
Cyrus Najmabadi 285497edf8 Reserve _i and _n as names we often want to generate 2015-03-13 16:45:58 -07:00
Cyrus Najmabadi d8d4719765 Add experimental option to cache the .length access in downlevel for-of emit. 2015-03-13 16:15:25 -07:00
Vladimir Matveev d163205da6 accepted baselines 2015-03-13 15:59:22 -07:00
Cyrus Najmabadi b51d33e262 Use 'let' in the compiler layer. 2015-03-13 15:07:40 -07:00
Vladimir Matveev db324db202 merge with master 2015-03-13 14:44:54 -07:00
Vladimir Matveev 0675a92acc consider binding elements as always initialized with doing shadow check 2015-03-13 14:34:10 -07:00
Cyrus Najmabadi e90a5dc5bb Update baselines. 2015-03-13 13:43:46 -07:00
Vladimir Matveev 82a940df06 Merge pull request #2323 from Microsoft/letConstInDestructuringInNotStrictMode
correctly parse destructuring in let outside of strict mode
2015-03-13 13:34:06 -07:00
Vladimir Matveev 64fa7fbecb use Value meaning as a filter when resolving names to prevent skipping other value in favor of block-scoped variables 2015-03-13 11:52:14 -07:00
Mohamed Hegazy a6a8a96249 Support an optional type annotation on export default statement 2015-03-12 22:52:54 -07:00
Vladimir Matveev 879639615b merge with master 2015-03-12 18:28:57 -07:00
Mohamed Hegazy 8e0626555b Merge branch 'master' into es6ImportExportEmit 2015-03-12 17:21:48 -07:00
Mohamed Hegazy b6bbf06e13 Update error message 2015-03-12 17:21:04 -07:00
Mohamed Hegazy b3c8bcb319 Emit export default in ES6 2015-03-12 17:14:33 -07:00
Yui T af05afdc50 Emit Super as super 2015-03-12 16:34:06 -07:00
Yui T 800c523f4f Clean up redundant tests 2015-03-12 16:02:43 -07:00
Yui T 0672923323 Parse classDeclaration in strict mode code for ES6 2015-03-12 15:19:45 -07:00