Skip to content

Commit 1f907ae

Browse files
Make SourceFileImportsList internal again.
1 parent 5eb6425 commit 1f907ae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/compiler/program.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,8 @@ namespace ts {
540540
* Subset of a SourceFile used to calculate index-based resolutions
541541
* This includes some internal fields, so unless you have very good reason,
542542
* (and are willing to use some less stable internals) you should probably just pass a SourceFile.
543+
*
544+
* @internal
543545
*/
544546
export interface SourceFileImportsList {
545547
/* @internal */ imports: SourceFile["imports"];
@@ -562,7 +564,10 @@ namespace ts {
562564
* @param file File to fetch the resolution mode within
563565
* @param index Index into the file's complete resolution list to get the resolution of - this is a concatenation of the file's imports and module augmentations
564566
*/
565-
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number) {
567+
export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
568+
/** @internal */
569+
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
570+
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined {
566571
if (file.impliedNodeFormat === undefined) return undefined;
567572
// we ensure all elements of file.imports and file.moduleAugmentations have the relevant parent pointers set during program setup,
568573
// so it's safe to use them even pre-bind

0 commit comments

Comments
 (0)