Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract source resolution logic into its own source loader (microsoft…
…#4324) This will allow other tools to be able to reuse the typespec compiler source resolution logic(Figure out all the imported files) without doing a full compile and cleans up the program.ts which is doing a lot of things. Usage ```ts const loader = createSourceLoader(host); loader.importFile(resolvePath(cwd, "main.tsp", {type: "project"})); loader.importPath("./foo.tsp", NoTarget, cwd, {type: "project"} ); loader.resolution.sourceFiles // Tsp source files loaded loader.resolution.jsSourceFiles // Js source file loaded ```
- Loading branch information