Skip to content

Commit 0dc95ce

Browse files
committed
Use double quotes in declaration file's reference path generation so that quotes in file name wouldnt affect reference resolution
Fixes #474
1 parent f582902 commit 0dc95ce

File tree

198 files changed

+274
-308
lines changed

Some content is hidden

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

198 files changed

+274
-308
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3103,7 +3103,7 @@ module ts {
31033103
compilerHost.getCurrentDirectory(),
31043104
/*isAbsolutePathAnUrl*/ false);
31053105

3106-
referencePathsOutput += "/// <reference path='" + declFileName + "' />" + newLine;
3106+
referencePathsOutput += "/// <reference path=\"" + declFileName + "\" />" + newLine;
31073107
}
31083108

31093109
if (root) {

tests/baselines/reference/declFileAmbientExternalModuleWithSingleExportedModule.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ declare module "SubModule" {
3333
}
3434
}
3535
//// [declFileAmbientExternalModuleWithSingleExportedModule_1.d.ts]
36-
/// <reference path='declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts' />
36+
/// <reference path="declFileAmbientExternalModuleWithSingleExportedModule_0.d.ts" />
3737
import SubModule = require('SubModule');
3838
export declare var x: SubModule.m.m3.c;

tests/baselines/reference/declFileForExportedImport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ var z = exports.b.x;
2424
//// [declFileForExportedImport_0.d.ts]
2525
export declare var x: number;
2626
//// [declFileForExportedImport_1.d.ts]
27-
/// <reference path='declFileForExportedImport_0.d.ts' />
27+
/// <reference path="declFileForExportedImport_0.d.ts" />
2828
export import a = require('declFileForExportedImport_0');
2929
export import b = a;

tests/baselines/reference/importDecl.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,11 +205,11 @@ export declare function foo(): d;
205205
import m4 = require("importDecl_require");
206206
export declare function foo2(): m4.d;
207207
//// [importDecl_1.d.ts]
208-
/// <reference path='importDecl_require.d.ts' />
209-
/// <reference path='importDecl_require1.d.ts' />
210-
/// <reference path='importDecl_require2.d.ts' />
211-
/// <reference path='importDecl_require3.d.ts' />
212-
/// <reference path='importDecl_require4.d.ts' />
208+
/// <reference path="importDecl_require.d.ts" />
209+
/// <reference path="importDecl_require1.d.ts" />
210+
/// <reference path="importDecl_require2.d.ts" />
211+
/// <reference path="importDecl_require3.d.ts" />
212+
/// <reference path="importDecl_require4.d.ts" />
213213
import m4 = require("importDecl_require");
214214
export declare var x4: m4.d;
215215
export declare var d4: typeof m4.d;

tests/baselines/reference/importDeclarationUsedAsTypeQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ export declare class B {
2727
id: number;
2828
}
2929
//// [importDeclarationUsedAsTypeQuery_1.d.ts]
30-
/// <reference path='importDeclarationUsedAsTypeQuery_require.d.ts' />
30+
/// <reference path="importDeclarationUsedAsTypeQuery_require.d.ts" />
3131
import a = require('importDeclarationUsedAsTypeQuery_require');
3232
export declare var x: typeof a;

tests/baselines/reference/missingImportAfterModuleImport.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ declare module "SubModule" {
4343
export = SubModule;
4444
}
4545
//// [missingImportAfterModuleImport_1.d.ts]
46-
/// <reference path='missingImportAfterModuleImport_0.d.ts' />
46+
/// <reference path="missingImportAfterModuleImport_0.d.ts" />
4747
import SubModule = require('SubModule');
4848
declare class MainModule {
4949
SubModule: SubModule;

tests/baselines/reference/moduleSymbolMerging.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ declare module A {
3535
}
3636
}
3737
//// [B.d.ts]
38-
/// <reference path='A.d.ts' />
38+
/// <reference path="A.d.ts" />
3939
declare module A {
4040
}
4141
declare module B {

tests/baselines/reference/privacyCannotNameAccessorDeclFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export declare module SpecializedWidget {
402402
function createWidget2(): Widget2;
403403
}
404404
//// [privacyCannotNameAccessorDeclFile_exporter.d.ts]
405-
/// <reference path='privacyCannotNameAccessorDeclFile_GlobalWidgets.d.ts' />
405+
/// <reference path="privacyCannotNameAccessorDeclFile_GlobalWidgets.d.ts" />
406406
import Widgets = require("privacyCannotNameAccessorDeclFile_Widgets");
407407
import Widgets1 = require("GlobalWidgets");
408408
export declare function createExportedWidget1(): Widgets.Widget1;

tests/baselines/reference/privacyCannotNameVarTypeDeclFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ export declare module SpecializedWidget {
230230
function createWidget2(): Widget2;
231231
}
232232
//// [privacyCannotNameVarTypeDeclFile_exporter.d.ts]
233-
/// <reference path='privacyCannotNameVarTypeDeclFile_GlobalWidgets.d.ts' />
233+
/// <reference path="privacyCannotNameVarTypeDeclFile_GlobalWidgets.d.ts" />
234234
import Widgets = require("privacyCannotNameVarTypeDeclFile_Widgets");
235235
import Widgets1 = require("GlobalWidgets");
236236
export declare function createExportedWidget1(): Widgets.Widget1;

tests/baselines/reference/privacyFunctionCannotNameParameterTypeDeclFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export declare module SpecializedWidget {
416416
function createWidget2(): Widget2;
417417
}
418418
//// [privacyFunctionCannotNameParameterTypeDeclFile_exporter.d.ts]
419-
/// <reference path='privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.d.ts' />
419+
/// <reference path="privacyFunctionCannotNameParameterTypeDeclFile_GlobalWidgets.d.ts" />
420420
import Widgets = require("privacyFunctionCannotNameParameterTypeDeclFile_Widgets");
421421
import Widgets1 = require("GlobalWidgets");
422422
export declare function createExportedWidget1(): Widgets.Widget1;

0 commit comments

Comments
 (0)