mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-07-04 14:56:16 -05:00
Clean up
This commit is contained in:
@@ -1748,7 +1748,6 @@ export function getEntrypointsFromPackageJsonInfo(
|
||||
}
|
||||
|
||||
let entrypoints: string[] | undefined;
|
||||
// TODO: + Json?
|
||||
const extensions = Extensions.TypeScript | Extensions.Declaration | (resolveJs ? Extensions.JavaScript : 0);
|
||||
const features = getDefaultNodeResolutionFeatures(options);
|
||||
const requireState = getTemporaryModuleResolutionState(cache?.getPackageJsonInfoCache(), host, options);
|
||||
@@ -1960,7 +1959,6 @@ function loadNodeModuleFromDirectoryWorker(extensions: Extensions, candidate: st
|
||||
}
|
||||
|
||||
// Even if extensions is DtsOnly, we can still look up a .ts file as a result of package.json "types"
|
||||
// TODO: what? Why even bother with DtsOnly?
|
||||
const expandedExtensions = extensions === Extensions.Declaration ? Extensions.TypeScript | Extensions.Declaration : extensions;
|
||||
// Don't do package.json lookup recursively, because Node.js' package lookup doesn't.
|
||||
|
||||
|
||||
@@ -7778,8 +7778,6 @@ const allSupportedExtensionsWithJson: readonly Extension[][] = [...allSupportedE
|
||||
export const supportedDeclarationExtensions: readonly Extension[] = [Extension.Dts, Extension.Dcts, Extension.Dmts];
|
||||
/** @internal */
|
||||
export const supportedTSImplementationExtensions: readonly Extension[] = [Extension.Ts, Extension.Cts, Extension.Mts, Extension.Tsx];
|
||||
/** @internal */
|
||||
export const supportedImplementationExtensions: readonly Extension[] = [...supportedTSImplementationExtensions, ...supportedJSExtensionsFlat];
|
||||
|
||||
/** @internal */
|
||||
export function getSupportedExtensions(options?: CompilerOptions): readonly Extension[][];
|
||||
|
||||
@@ -232,7 +232,6 @@ describe("unittests:: config:: configurationExtension", () => {
|
||||
function testSuccess(name: string, entry: string, expected: ts.CompilerOptions, expectedFiles: string[]) {
|
||||
expected.configFilePath = entry;
|
||||
it(name, () => {
|
||||
console.log(name);
|
||||
const parsed = getParseCommandLine(entry);
|
||||
assert(!parsed.errors.length, ts.flattenDiagnosticMessageText(parsed.errors[0] && parsed.errors[0].messageText, "\n"));
|
||||
assert.deepEqual(parsed.options, expected);
|
||||
|
||||
Reference in New Issue
Block a user