Commit Graph

2648 Commits

Author SHA1 Message Date
Vladimir Matveev
60f3fe3de2 emit input non .ts files as separate files when 'allowNonTsExtensions' and 'separateCompilation' flags are specified (used in 'transpile' related scenarios) 2015-05-04 11:21:35 -07:00
Daniel Rosenwasser
4cc1848a17 Merge pull request #2996 from Microsoft/lastOrUndefinedReplacement
Replace awkward last-element selection pattern with 'lastOrUndefined'
2015-05-03 22:28:51 -07:00
Frank Wallis
76dceb89e4 Rename parameter static -> isStatic, fixes 'static is a reserved identifier' error when running in strict mode (#3006) 2015-05-03 19:14:09 +01:00
Daniel Rosenwasser
4ebfee2051 Use 'lastOrUndefined' where appropriate in the compiler. 2015-05-01 18:34:26 -07:00
Mohamed Hegazy
689c09cb10 Merge branch 'whitneyit-feature/noEmitExtends' 2015-05-01 16:41:32 -07:00
Mohamed Hegazy
101aedbf4e Do not emit __extends if --noEmitHelpers is set 2015-05-01 16:29:41 -07:00
Ron Buckton
60ae9bd14d Fixes helpers in strict mode 2015-05-01 10:49:54 -07:00
James Whitney
76fa4b838f Add support for --noEmitHelpers flag
This PR is a Work In Progress that addresses multiple `__extends`
being output as described in #1350: Multiple `__extends` being output
when `--module amd` is set.

The issue still exists as of `v1.5.0 - f53e6a8`.

Apparently a fix was created for this in #1356 but according to #2009, a
[comment](https://github.com/Microsoft/TypeScript/issues/2009#issuecomment-74136291)
later indicated that this was never merged in.

Further conversation continued in #2487 but did not yield any result. I
refer to my earlier recommendation in #1350.

> My question is this, would the TypeScript team be open to a flag that
> can be passed to tsc that will generate something like the following
> ```ts
> define(["require", "exports", "__extends", './mammal'], function (require, exports, __extends, Mammal) {
>     var Human = (function (_super) {
>         __extends(Human, _super);
>         function Human() {
>             _super.apply(this, arguments);
>         }
>         return Human;
>     })(Mammal);
>     return Human;
> });
> ```

To continue with the naming convention I have chosen the flag
`--noEmitHelpers`.
2015-04-30 13:23:30 +10:00
Mohamed Hegazy
64f3798bd7 Merge pull request #2935 from Microsoft/relaxExportEqualsCheck
Fix #2929: relax the check for export= in ES6 if it is resulting from an ambient declaration
2015-04-29 17:26:55 -07:00
Cyrus Najmabadi
85d0c2226f Restore checker simplification that was reverted due to a bad merge. 2015-04-29 15:10:25 -07:00
Paul van Brenk
270a149571 Merge pull request #2963 from Microsoft/RenameHeritageClauseElement
Rename HeritageClauseElement to ExpressionWithTypeArguments + related methods.
2015-04-29 15:01:29 -07:00
Paul van Brenk
54ef1bf93d Rename HeritageClauseElement to ExpressionWithTypeArguments + related methods. 2015-04-29 14:49:03 -07:00
Vladimir Matveev
2184be883c addressed PR feedback 2015-04-29 13:56:17 -07:00
Vladimir Matveev
4a919d4f04 exclude 'default' from star exports 2015-04-29 11:43:23 -07:00
Vladimir Matveev
5f18d9b912 extract emitExportStar in separate function 2015-04-28 20:17:55 -07:00
Vladimir Matveev
3af5592243 allow module to reserve slots for names that they export 2015-04-28 18:51:29 -07:00
Vladimir Matveev
c057c0a22a merge with master 2015-04-28 18:00:26 -07:00
Daniel Rosenwasser
f988a11cfc Merge pull request #2949 from Microsoft/cleanupAndSpeedupFourslash
Cleanup and speedup fourslash
2015-04-28 17:50:25 -07:00
Daniel Rosenwasser
97cd07d1d4 Cache the emit of 'fourslash.ts'.
Yields a >25% decrease in running time for fourslash tests on my machine.
2015-04-28 17:20:38 -07:00
Anders Hejlsberg
4c5aeaf0c9 Merge branch 'master' into namespaces
Conflicts:
	src/compiler/diagnosticInformationMap.generated.ts
	src/compiler/diagnosticMessages.json
	src/compiler/program.ts
	tests/baselines/reference/constDeclarations-access5.errors.txt
	tests/baselines/reference/es6-amd.errors.txt
	tests/baselines/reference/es6-declaration-amd.errors.txt
	tests/baselines/reference/es6-sourcemap-amd.errors.txt
	tests/baselines/reference/es6-umd.errors.txt
	tests/baselines/reference/es6-umd2.errors.txt
	tests/baselines/reference/es6ImportDefaultBindingFollowedWithNamedImport.errors.txt
	tests/baselines/reference/es6ImportNameSpaceImport.errors.txt
	tests/baselines/reference/es6ImportNamedImport.errors.txt
	tests/baselines/reference/es6ImportNamedImportInExportAssignment.errors.txt
	tests/baselines/reference/es6ModuleWithModuleGenTargetAmd.errors.txt
	tests/baselines/reference/es6ModuleWithModuleGenTargetCommonjs.errors.txt
2015-04-28 16:49:23 -07:00
Vladimir Matveev
7037c6be11 removed redundant check 2015-04-28 16:37:08 -07:00
Vladimir Matveev
054b22ebc5 Merge remote-tracking branch 'origin/master' into localStorageForExportedNames 2015-04-28 16:19:13 -07:00
Vladimir Matveev
aa1ad5233e generate local storage for all exported names to avoid overwriting them via star exports 2015-04-28 16:18:33 -07:00
Vladimir Matveev
6ce9176926 always emit files as modules when separateCompilation flag is specified 2015-04-27 15:47:49 -07:00
Mohamed Hegazy
992bbff5b1 Fix #2929: relax the check for export= in ES6 if it is resulting from an ambient declaration 2015-04-27 13:46:45 -07:00
Mohamed Hegazy
32409f9b9b Merge branch 'master' into inlineSourceMaps 2015-04-27 10:11:43 -07:00
Anders Hejlsberg
034e8b052c Adjusting error messages 2015-04-26 18:29:37 -07:00
Anders Hejlsberg
eecf7ba638 Support 'namespace' declarations for internal modules 2015-04-26 16:12:16 -07:00
Vladimir Matveev
af8925545e addressed PR feedback 2015-04-23 21:14:03 -07:00
Vladimir Matveev
b1cc06e44c merge with master 2015-04-23 20:50:35 -07:00
Ron Buckton
f53e6a8b85 Merge pull request #2897 from Microsoft/fixThisInDecoratorHelpers
Fix this in decorator helpers
2015-04-23 16:13:25 -07:00
Ron Buckton
1c40032579 Fixes his in decorator helpers 2015-04-23 15:36:07 -07:00
Paul van Brenk
3907caec68 Merge pull request #2877 from Microsoft/tsconfigSupportInLS
This adds a method to the language service to parse a tsconfig file and correctly calculate the initial collection of files to consider. 

We expect the 'host' to find the files in the file system.
2015-04-23 15:21:08 -07:00
Daniel Rosenwasser
f83efcc7aa Merge pull request #2895 from Microsoft/reservedNamesImportsExports
Allow contextually reserved names in import/export clauses
2015-04-23 14:52:57 -07:00
Ron Buckton
bc5e5a20ea Merge pull request #2892 from Microsoft/lazyGlobalDecoratorTypes
Lazy resolution of global decorator types
2015-04-23 14:47:36 -07:00
Daniel Rosenwasser
a0cb5a10d6 Fixed checks to use isReservedNameInStrictMode. 2015-04-23 14:16:48 -07:00
Paul van Brenk
42c1bdd607 Merge branch 'master' into tsconfigSupportInLS 2015-04-23 13:37:01 -07:00
Paul van Brenk
a3885e5af0 Don't double wrap exceptions. 2015-04-23 13:36:54 -07:00
Paul van Brenk
f5b75439ea Merge branch 'master' of https://github.com/Microsoft/TypeScript 2015-04-23 12:58:27 -07:00
Ron Buckton
a9e79bf06b Lazy resolution of global decorator types 2015-04-23 11:04:44 -07:00
Mohamed Hegazy
ded0e398b4 update error messages 2015-04-23 10:53:19 -07:00
Mohamed Hegazy
ae4474aa40 Merge branch 'fix-2036' of https://github.com/csnover/TypeScript into csnover-fix-2036 2015-04-23 10:21:11 -07:00
Paul van Brenk
8955d7ba57 More refactoring 2015-04-22 18:09:55 -07:00
Paul van Brenk
f8424d0b0c Minor clean up to make it more readable. 2015-04-22 18:00:09 -07:00
Paul van Brenk
5c44a0ff3e Improve error message when encountering an invalid tsconfig.json file. 2015-04-22 15:58:04 -07:00
Jason Freeman
60afbc1334 Merge pull request #2875 from Microsoft/incrementor
Rename iterator property of ForStatement to incrementor
2015-04-22 15:07:09 -07:00
Anders Hejlsberg
4a98c4680a Merge pull request #2804 from Microsoft/unionPropertyAccess
Only public properties accessible through union type
2015-04-22 14:16:30 -07:00
Anders Hejlsberg
3309e754c1 Merge pull request #2851 from Microsoft/circularTypeAlias
Support circular type aliases in signatures
2015-04-22 14:06:52 -07:00
Jason Freeman
4487fa426b Rename iterator property of ForStatement to incrementor 2015-04-22 13:29:50 -07:00
Paul van Brenk
c6a9c8fa89 Merge branch 'master' of https://github.com/Microsoft/TypeScript 2015-04-22 13:05:07 -07:00