mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Make SourceFileImportsList internal again.
This commit is contained in:
committed by
GitHub
parent
5eb6425569
commit
1f907ae640
@@ -540,6 +540,8 @@ namespace ts {
|
||||
* Subset of a SourceFile used to calculate index-based resolutions
|
||||
* This includes some internal fields, so unless you have very good reason,
|
||||
* (and are willing to use some less stable internals) you should probably just pass a SourceFile.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
export interface SourceFileImportsList {
|
||||
/* @internal */ imports: SourceFile["imports"];
|
||||
@@ -562,7 +564,10 @@ namespace ts {
|
||||
* @param file File to fetch the resolution mode within
|
||||
* @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
|
||||
*/
|
||||
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number) {
|
||||
export function getModeForResolutionAtIndex(file: SourceFile, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
|
||||
/** @internal */
|
||||
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined;
|
||||
export function getModeForResolutionAtIndex(file: SourceFileImportsList, index: number): ModuleKind.CommonJS | ModuleKind.ESNext | undefined {
|
||||
if (file.impliedNodeFormat === undefined) return undefined;
|
||||
// we ensure all elements of file.imports and file.moduleAugmentations have the relevant parent pointers set during program setup,
|
||||
// so it's safe to use them even pre-bind
|
||||
|
||||
Reference in New Issue
Block a user