-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone
Milestone
Description
Consider the following example.
In typings_module:
vars.d.ts:
interface UserProperties {
}
declare global {
const variable: UserProperties;
}
index.d.ts:
export as namespace ModuleNamespace;
export * from "./vars"
Now, we want to specify properties for the UserProperties
interface.
a_project_file.d.ts:
declare module "typings_module" {
export interface UserProperties {
test: number;
}
}
export {}
The bug is the type merging works only if the "typings_module" files are inside "node_modules/@types/" and does not work if the same files are referenced from another location via the "typeRoots" TSC option in "tsconfig.json".
TypeScript Version: 3.9.6
Search Terms: "type merging", "declaration files"
kant2002, wrzucher, xiaoxiangmoe and noevidenzxiaoxiangmoe
Metadata
Metadata
Assignees
Labels
Fix AvailableA PR has been opened for this issueA PR has been opened for this issueNeeds InvestigationThis issue needs a team member to investigate its status.This issue needs a team member to investigate its status.RescheduledThis issue was previously scheduled to an earlier milestoneThis issue was previously scheduled to an earlier milestone