Commit Graph

35940 Commits

Author SHA1 Message Date
Vladimir Matveev 171a5f8098 correctly parse destructuring in let outside of strict mode 2015-03-12 10:59:59 -07:00
Mohamed Hegazy 680cf6d844 Emit export internal import equals declaration in es6 format 2015-03-12 10:34:39 -07:00
CyrusNajmabadi ecfa19a760 Merge pull request #2321 from Microsoft/diagnosticAsserts
Add additional asserts to ensure we don't create diagnostics with bogus ...
2015-03-12 10:27:47 -07:00
Mohamed Hegazy 6bcbe824aa Emit export class declaration in es6 format.
Note since we havent yet changed the emitting of class declaration to es6 format,
we are just exporting the constructor function

Conflicts:
	src/compiler/emitter.ts
2015-03-12 10:27:46 -07:00
Cyrus Najmabadi 36ac0c8f59 Add additional asserts to ensure we don't create diagnostics with bogus positions. 2015-03-12 10:16:28 -07:00
Mohamed Hegazy b091fa57ef Emit export function declaration in es6 format
Conflicts:
	src/compiler/emitter.ts
2015-03-12 10:11:37 -07:00
Mohamed Hegazy 58d19595f0 Emit ES6 module enum declaration
Conflicts:
	src/compiler/emitter.ts
2015-03-12 10:00:48 -07:00
Yui T 56839604da Disallow refering to static property in computed property name 2015-03-12 08:40:09 -07:00
Mohamed Hegazy b9f63a85b1 Emit es6 export ModuleDeclaration
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/es6ExportAll.js
	tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js
2015-03-12 01:38:35 -07:00
Sheetal Nandi 05932fdddf Es6 module emit for export VarDeclaration, export LexicalDeclaration
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/es6ExportAll.js
	tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js
	tests/baselines/reference/es6ImportNamedImport.js
2015-03-12 01:29:53 -07:00
Sheetal Nandi 29b221430f Do not rewrite substitute named import reference when generating es6 modules
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js
	tests/baselines/reference/es6ImportNamedImport.js
2015-03-12 00:59:52 -07:00
Sheetal Nandi 006ed82730 Remove references with exports.id as es6 module doesnt have exports.id
Conflicts:
	tests/baselines/reference/es6ExportAll.js
	tests/baselines/reference/es6ExportClauseWithoutModuleSpecifier.js
	tests/baselines/reference/es6ImportNamedImport.js
2015-03-12 00:52:14 -07:00
Sheetal Nandi 4b7548487c Fix the checks with language version to use default es3 2015-03-12 00:36:14 -07:00
Mohamed Hegazy 3ed8bcc179 Simplify module kind selection 2015-03-12 00:18:20 -07:00
Mohamed Hegazy 8c26507bd5 Support for emitting import declaration in es6 format
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/es6ImportDefaultBinding.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js
	tests/baselines/reference/es6ImportNameSpaceImport.js
	tests/baselines/reference/es6ImportNamedImport.js
2015-03-12 00:17:40 -07:00
Vladimir Matveev d3246a340a addressed PR feedback 2015-03-11 23:49:35 -07:00
Mohamed Hegazy 7b3e50fb98 Emit in ES6 module if script target is es6 or higher
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/es6ImportDefaultBinding.js
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.js
	tests/baselines/reference/es6ImportNameSpaceImport.js
	tests/baselines/reference/es6ImportNamedImport.js
2015-03-11 23:29:30 -07:00
Mohamed Hegazy 4ef687c5fa Add tests 2015-03-11 22:55:09 -07:00
Mohamed Hegazy b52d9ec23e Report error if module gen target is specified in es6
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/program.ts
	tests/baselines/reference/constDeclarations-access5.errors.txt
	tests/baselines/reference/es6ExportAssignment.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamespaceBinding.js
	tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt
	tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt
	tests/cases/compiler/es6ImportDefaultBinding.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImport1.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamedImportDts.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding.ts
	tests/cases/compiler/es6ImportDefaultBindingFollowedWithNamespaceBinding1.ts
	tests/cases/compiler/es6ImportDefaultBindingMergeErrors.ts
	tests/cases/compiler/es6ImportDefaultBindingNoDefaultProperty.ts
	tests/cases/compiler/es6ImportNameSpaceImport.ts
	tests/cases/compiler/es6ImportNamedImport.ts
	tests/cases/compiler/es6ImportNamedImportMergeErrors.ts
	tests/cases/compiler/es6ImportNamedImportNoExportMember.ts
	tests/cases/compiler/es6ImportWithoutFromClause.ts
	tests/cases/compiler/es6ImportWithoutFromClauseNonInstantiatedModule.ts
2015-03-11 22:53:36 -07:00
Mohamed Hegazy 04ea7fe6de Handel isDeclaration visible for imports 2015-03-11 22:17:16 -07:00
Mohamed Hegazy a6e4e04bd9 Add tests 2015-03-11 22:16:52 -07:00
Mohamed Hegazy 61a5bfb09d Report error on export assignment with es6 and above target
Conflicts:
	src/compiler/checker.ts
	tests/baselines/reference/es6ImportDefaultBinding.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport1.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt
	tests/baselines/reference/es6ImportEqualsDeclaration.errors.txt
	tests/cases/compiler/es6ImportNameSpaceImportMergeErrors.ts
	tests/cases/compiler/es6ImportNameSpaceImportNoNamedExports.ts
	tests/cases/compiler/es6ImportNamedImportInExportAssignment.ts
	tests/cases/compiler/es6ImportNamedImportInIndirectExportAssignment.ts
	tests/cases/compiler/es6ImportNamedImportNoNamedExports.ts
2015-03-11 21:53:37 -07:00
Mohamed Hegazy e902d8462e ES6 doesnt support import id = require("mod") syntax
Conflicts:
	src/compiler/checker.ts
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
2015-03-11 21:40:10 -07:00
Jason Freeman 7d2d55e44e Rebaseline tests that will be affected by #2308 2015-03-11 18:53:04 -07:00
Vladimir Matveev 751b1aee16 disallow recursive references for block-scoped bindings 2015-03-11 16:54:18 -07:00
Yui T 7ee587c43f Emit class with export and export default 2015-03-11 16:45:55 -07:00
Jason Freeman 03176d33ef Add tests for downlevel for-of type checking 2015-03-11 16:34:18 -07:00
Jason Freeman 29cbe9d4ba Remove unhelpful comment 2015-03-11 16:34:15 -07:00
Jason Freeman 32aee67c4f Change a test to be more interesting 2015-03-11 16:34:11 -07:00
Jason Freeman 61cd2a7543 Introduce checkElementTypeOfArrayOrString for downlevel for..of type checking 2015-03-11 16:34:08 -07:00
Jason Freeman 5b46f5f9ae Remove error for using 'for...of' in ES3/ES5 2015-03-11 16:34:04 -07:00
Yui T a0a506b11b Emit class declaration with static property assignment 2015-03-11 16:13:08 -07:00
CyrusNajmabadi b38743c793 Merge pull request #2307 from Microsoft/sigHelpIndex
Compute consistent argument indices and counts for signature help.
2015-03-11 16:02:00 -07:00
Vladimir Matveev d2ecfa7526 Merge pull request #2303 from Microsoft/smartIndentInIncompleteForLikeStatements
added for* statements to isCompletedNode
2015-03-11 15:58:04 -07:00
Cyrus Najmabadi 05c2a3ef89 Add explanatory comments. 2015-03-11 15:30:33 -07:00
Cyrus Najmabadi 63ba645791 Remove unnecessary code. 2015-03-11 15:08:28 -07:00
Cyrus Najmabadi d9d90b2c02 Compute consistent argument indices and counts for signature help. 2015-03-11 15:05:31 -07:00
Cyrus Najmabadi 42ae38ddcc Add failing test. 2015-03-11 14:44:32 -07:00
Vladimir Matveev 4b955ee91a added for* statements to isCompletedNode 2015-03-11 14:03:32 -07:00
Yui T da12d465d0 Add tests for extension, type arguments, overload 2015-03-10 19:11:07 -07:00
Vladimir Matveev 76dcfb660b Merge pull request #2291 from Microsoft/letConstInSwitchStatements
introduce CaseBlock as a block-scoped container for switch statements
2015-03-10 18:33:54 -07:00
Vladimir Matveev 59c71acae8 introduce emitCaseBlock function 2015-03-10 18:17:52 -07:00
Vladimir Matveev efcf0e6f57 introduce CaseBlock as a block-scoped container for switch statements 2015-03-10 17:50:54 -07:00
Yui T 890aa4a84d test cases for constructor overload, non-static property assignment, getter/setter, method, static method, 2015-03-10 17:39:13 -07:00
Yui T 1b84f1d1d0 emit get/set member function 2015-03-10 17:22:33 -07:00
Daniel Rosenwasser aa08300cbf Merge pull request #2238 from caitp/issue-2090
Improve array destructuring error message
2015-03-10 16:13:19 -07:00
Yui T 8576282975 Emit non-getter/setter member function 2015-03-10 15:41:41 -07:00
Yui T d3205ef955 Remove redundant sourcemap span and comment. Differentiate between emit for below ES6 and above ES6 2015-03-10 15:21:38 -07:00
Caitlin Potter 0d06729b18 Move comment and refer to tuple type literal syntax rather than TupleType interface 2015-03-10 15:58:39 -04:00
Mohamed Hegazy 11bb5f9851 Merge pull request #2275 from DickvdBrink/object-generics
made seal, freeze and preventExtensions generic
2015-03-10 12:24:16 -07:00