Closed
Description
openedon Jan 4, 2023
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" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment