-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this
Milestone
Description
Bug Report
π Search Terms
reference types
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about triple slash directives.
β― Playground Link
Unable to produce playground link, as this involves the use of several files.
GitHub repository: https://github.com/craxal/triple-slash-path
π» Code
module-one/PanelWindow.d.ts
declare global {
interface CustomWindow {
getSomething(): any;
}
interface Window {
customWindow: CustomWindow;
}
}
module-two/Class.ts
// <reference path="../../node_modules/storage-explorer/dist/PanelWindow.d.ts" />
import * as $ from "jquery";
import { IContextMenuItem } from "storage-explorer";
export interface ICustomType {
someProperty: string;
}
export async function doSomething(args: ICustomType): any {
const obj = await window.customWindow.getSomething();
return obj;
}
π Actual behavior
The triple slash directive is compiled to something similar to the following (note the casing is not preserved, even if forceConsistentCasingInFileNames
is set to true
):
// <reference types="module-one/customwindow" />
Because of this issue, I cannot compile on macOS. This is not an issue on Windows.
π Expected behavior
I expect the triple slash directive in module-two/Class.ts to be compiled to something similar to the following (note the casing ought to be preserved if forceConsistentCasingInFileNames
is set to true
):
// <reference types="module-one/CustomWindow" />
JasonYeMSFT
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this