Skip to content

Commit 38b605e

Browse files
Merge branch 'release-1.6'
Conflicts: src/compiler/diagnosticInformationMap.generated.ts src/compiler/diagnosticMessages.json src/compiler/program.ts tests/baselines/reference/emptyObjectBindingPatternParameter04.symbols tests/baselines/reference/emptyObjectBindingPatternParameter04.types tests/baselines/reference/nodeResolution5.errors.txt tests/baselines/reference/nodeResolution7.errors.txt
2 parents 89718cf + a44d8e7 commit 38b605e

File tree

87 files changed

+2283
-817
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2283
-817
lines changed

Jakefile.js

+12-3
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ var servicesFile = path.join(builtLocalDirectory, "typescriptServices.js");
394394
var standaloneDefinitionsFile = path.join(builtLocalDirectory, "typescriptServices.d.ts");
395395
var nodePackageFile = path.join(builtLocalDirectory, "typescript.js");
396396
var nodeDefinitionsFile = path.join(builtLocalDirectory, "typescript.d.ts");
397+
var nodeStandaloneDefinitionsFile = path.join(builtLocalDirectory, "typescript_standalone.d.ts");
397398

398399
compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].concat(servicesSources),
399400
/*prefixes*/ [copyright],
@@ -410,11 +411,19 @@ compileFile(servicesFile, servicesSources,[builtLocalDirectory, copyright].conca
410411

411412
prependFile(copyright, standaloneDefinitionsFile);
412413

413-
// Create the node definition file by replacing 'ts' module with '"typescript"' as a module.
414+
// Stanalone/web definition file using global 'ts' namespace
414415
jake.cpR(standaloneDefinitionsFile, nodeDefinitionsFile, {silent: true});
415416
var definitionFileContents = fs.readFileSync(nodeDefinitionsFile).toString();
416-
definitionFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
417-
fs.writeFileSync(nodeDefinitionsFile, definitionFileContents);
417+
418+
// Official node package definition file, pointed to by 'typings' in package.json
419+
// Created by appending 'export = ts;' at the end of the standalone file to turn it into an external module
420+
var nodeDefinitionsFileContents = definitionFileContents + "\r\nexport = ts;";
421+
fs.writeFileSync(nodeDefinitionsFile, nodeDefinitionsFileContents);
422+
423+
// Node package definition file to be distributed without the package. Created by replacing
424+
// 'ts' namespace with '"typescript"' as a module.
425+
var nodeStandaloneDefinitionsFileContents = definitionFileContents.replace(/declare (namespace|module) ts/g, 'declare module "typescript"');
426+
fs.writeFileSync(nodeStandaloneDefinitionsFile, nodeStandaloneDefinitionsFileContents);
418427
});
419428

420429

lib/lib.d.ts

+30-2
Original file line numberDiff line numberDiff line change
@@ -3928,6 +3928,7 @@ declare module Intl {
39283928
timeZoneName?: string;
39293929
formatMatcher?: string;
39303930
hour12?: boolean;
3931+
timeZone?: string;
39313932
}
39323933

39333934
interface ResolvedDateTimeFormatOptions {
@@ -3997,18 +3998,45 @@ interface Number {
39973998

39983999
interface Date {
39994000
/**
4000-
* Converts a date to a string by using the current or specified locale.
4001+
* Converts a date and time to a string by using the current or specified locale.
40014002
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
40024003
* @param options An object that contains one or more properties that specify comparison options.
40034004
*/
40044005
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
4005-
40064006
/**
40074007
* Converts a date to a string by using the current or specified locale.
4008+
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
4009+
* @param options An object that contains one or more properties that specify comparison options.
4010+
*/
4011+
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
4012+
4013+
/**
4014+
* Converts a time to a string by using the current or specified locale.
4015+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
4016+
* @param options An object that contains one or more properties that specify comparison options.
4017+
*/
4018+
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
4019+
4020+
/**
4021+
* Converts a date and time to a string by using the current or specified locale.
40084022
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
40094023
* @param options An object that contains one or more properties that specify comparison options.
40104024
*/
40114025
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
4026+
4027+
/**
4028+
* Converts a date to a string by using the current or specified locale.
4029+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
4030+
* @param options An object that contains one or more properties that specify comparison options.
4031+
*/
4032+
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
4033+
4034+
/**
4035+
* Converts a time to a string by using the current or specified locale.
4036+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
4037+
* @param options An object that contains one or more properties that specify comparison options.
4038+
*/
4039+
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
40124040
}
40134041

40144042

lib/lib.dom.d.ts

+30-2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ declare module Intl {
104104
timeZoneName?: string;
105105
formatMatcher?: string;
106106
hour12?: boolean;
107+
timeZone?: string;
107108
}
108109

109110
interface ResolvedDateTimeFormatOptions {
@@ -173,18 +174,45 @@ interface Number {
173174

174175
interface Date {
175176
/**
176-
* Converts a date to a string by using the current or specified locale.
177+
* Converts a date and time to a string by using the current or specified locale.
177178
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
178179
* @param options An object that contains one or more properties that specify comparison options.
179180
*/
180181
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
181-
182182
/**
183183
* Converts a date to a string by using the current or specified locale.
184+
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
185+
* @param options An object that contains one or more properties that specify comparison options.
186+
*/
187+
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
188+
189+
/**
190+
* Converts a time to a string by using the current or specified locale.
191+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
192+
* @param options An object that contains one or more properties that specify comparison options.
193+
*/
194+
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
195+
196+
/**
197+
* Converts a date and time to a string by using the current or specified locale.
184198
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
185199
* @param options An object that contains one or more properties that specify comparison options.
186200
*/
187201
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
202+
203+
/**
204+
* Converts a date to a string by using the current or specified locale.
205+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
206+
* @param options An object that contains one or more properties that specify comparison options.
207+
*/
208+
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
209+
210+
/**
211+
* Converts a time to a string by using the current or specified locale.
212+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
213+
* @param options An object that contains one or more properties that specify comparison options.
214+
*/
215+
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
188216
}
189217

190218

lib/lib.es6.d.ts

+30-2
Original file line numberDiff line numberDiff line change
@@ -5216,6 +5216,7 @@ declare module Intl {
52165216
timeZoneName?: string;
52175217
formatMatcher?: string;
52185218
hour12?: boolean;
5219+
timeZone?: string;
52195220
}
52205221

52215222
interface ResolvedDateTimeFormatOptions {
@@ -5285,18 +5286,45 @@ interface Number {
52855286

52865287
interface Date {
52875288
/**
5288-
* Converts a date to a string by using the current or specified locale.
5289+
* Converts a date and time to a string by using the current or specified locale.
52895290
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
52905291
* @param options An object that contains one or more properties that specify comparison options.
52915292
*/
52925293
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
5293-
52945294
/**
52955295
* Converts a date to a string by using the current or specified locale.
5296+
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
5297+
* @param options An object that contains one or more properties that specify comparison options.
5298+
*/
5299+
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
5300+
5301+
/**
5302+
* Converts a time to a string by using the current or specified locale.
5303+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
5304+
* @param options An object that contains one or more properties that specify comparison options.
5305+
*/
5306+
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
5307+
5308+
/**
5309+
* Converts a date and time to a string by using the current or specified locale.
52965310
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
52975311
* @param options An object that contains one or more properties that specify comparison options.
52985312
*/
52995313
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
5314+
5315+
/**
5316+
* Converts a date to a string by using the current or specified locale.
5317+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
5318+
* @param options An object that contains one or more properties that specify comparison options.
5319+
*/
5320+
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
5321+
5322+
/**
5323+
* Converts a time to a string by using the current or specified locale.
5324+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
5325+
* @param options An object that contains one or more properties that specify comparison options.
5326+
*/
5327+
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
53005328
}
53015329

53025330

lib/lib.webworker.d.ts

+30-2
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ declare module Intl {
104104
timeZoneName?: string;
105105
formatMatcher?: string;
106106
hour12?: boolean;
107+
timeZone?: string;
107108
}
108109

109110
interface ResolvedDateTimeFormatOptions {
@@ -173,18 +174,45 @@ interface Number {
173174

174175
interface Date {
175176
/**
176-
* Converts a date to a string by using the current or specified locale.
177+
* Converts a date and time to a string by using the current or specified locale.
177178
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
178179
* @param options An object that contains one or more properties that specify comparison options.
179180
*/
180181
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
181-
182182
/**
183183
* Converts a date to a string by using the current or specified locale.
184+
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
185+
* @param options An object that contains one or more properties that specify comparison options.
186+
*/
187+
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
188+
189+
/**
190+
* Converts a time to a string by using the current or specified locale.
191+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
192+
* @param options An object that contains one or more properties that specify comparison options.
193+
*/
194+
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
195+
196+
/**
197+
* Converts a date and time to a string by using the current or specified locale.
184198
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
185199
* @param options An object that contains one or more properties that specify comparison options.
186200
*/
187201
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
202+
203+
/**
204+
* Converts a date to a string by using the current or specified locale.
205+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
206+
* @param options An object that contains one or more properties that specify comparison options.
207+
*/
208+
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
209+
210+
/**
211+
* Converts a time to a string by using the current or specified locale.
212+
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
213+
* @param options An object that contains one or more properties that specify comparison options.
214+
*/
215+
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
188216
}
189217

190218

0 commit comments

Comments
 (0)