You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
5109
+
* defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
5110
+
* If you have an actual import node, prefer using getModeForUsageLocation on the reference string node.
5111
+
* @param file File to fetch the resolution mode within
5112
+
* @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
* Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
5117
+
* one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
5118
+
* Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when
5119
+
* `moduleResolution` is `node16`+.
5120
+
* @param file The file the import or import-like reference is contained within
5121
+
* @param usage The module reference string
5122
+
* @returns The final resolution mode of the import
* Calculates the final resolution mode for an import at some index within a file's imports list. This is generally the explicitly
5109
+
* defined mode of the import if provided, or, if not, the mode of the containing file (with some exceptions: import=require is always commonjs, dynamic import is always esm).
5110
+
* If you have an actual import node, prefer using getModeForUsageLocation on the reference string node.
5111
+
* @param file File to fetch the resolution mode within
5112
+
* @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
* Calculates the final resolution mode for a given module reference node. This is generally the explicitly provided resolution mode, if
5117
+
* one exists, or the mode of the containing source file. (Excepting import=require, which is always commonjs, and dynamic import, which is always esm).
5118
+
* Notably, this function always returns `undefined` if the containing file has an `undefined` `impliedNodeFormat` - this field is only set when
5119
+
* `moduleResolution` is `node16`+.
5120
+
* @param file The file the import or import-like reference is contained within
5121
+
* @param usage The module reference string
5122
+
* @returns The final resolution mode of the import
0 commit comments