File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -821,11 +821,14 @@ namespace ts {
821
821
const nodeModulesPathPart = "/node_modules/" ;
822
822
823
823
/**
824
+ * This will be called on the successfully resolved path from `loadModuleFromFile`.
825
+ * (Not neeeded for `loadModuleFromNodeModules` as that looks up the `package.json` as part of resolution.)
826
+ *
824
827
* packageDirectory is the directory of the package itself.
825
828
* subModuleName is the path within the package.
826
- * For `foo/index.d.ts` this is { packageDirectory: "foo", subModuleName: "" }.
827
- * For `foo/bar.d.ts` this is { packageDirectory: "foo", subModuleName": "bar" }.
828
- * For `@types/foo/bar/index.d.ts` this is { packageDirectory: "@types /foo", subModuleName: "bar" }.
829
+ * For `/node_modules/ foo/index.d.ts` this is { packageDirectory: "foo", subModuleName: "" }.
830
+ * For `/node_modules/ foo/bar.d.ts` this is { packageDirectory: "foo", subModuleName": "bar" }.
831
+ * For `/node_modules/ @types/foo/bar/index.d.ts` this is { packageDirectory: "@types /foo", subModuleName: "bar" }.
829
832
*/
830
833
function parseNodeModuleFromPath ( path : string ) : { packageDirectory : string , subModuleName : string } | undefined {
831
834
path = normalizePath ( path ) ;
You can’t perform that action at this time.
0 commit comments