Revert the API change to resolveProjectReferencePath introduced in #27062

This commit is contained in:
Sheetal Nandi
2018-09-14 12:57:40 -07:00
parent e547cdf8e3
commit d6ffdde059
3 changed files with 18 additions and 3 deletions

View File

@@ -2820,13 +2820,20 @@ namespace ts {
};
}
// For backward compatibility
/** @deprecated */ export interface ResolveProjectReferencePathHost {
fileExists(fileName: string): boolean;
}
/**
* Returns the target config filename of a project reference.
* Note: The file might not exist.
*/
// TODO: Does this need to be exposed
export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName {
return resolveConfigFileProjectName(ref.path);
export function resolveProjectReferencePath(ref: ProjectReference): ResolvedConfigFileName;
/** @deprecated */ export function resolveProjectReferencePath(host: ResolveProjectReferencePathHost, ref: ProjectReference): ResolvedConfigFileName;
export function resolveProjectReferencePath(hostOrRef: ResolveProjectReferencePathHost | ProjectReference, ref?: ProjectReference): ResolvedConfigFileName {
const passedInRef = ref ? ref : hostOrRef as ProjectReference;
return resolveConfigFileProjectName(passedInRef.path);
}
/* @internal */