mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Replaces the default module index resolver with '/index' instead of '' when handling internal routing for dts bundles (#39277)
* Adds support for declaring the bundled name of a dts module export Co-authored-by: Wesley Wigham <wwigham@gmail.com> * Adds baselines * Update the tests * Try to reduce the scope of the bundledPackageName error * Use the flag in more baselines * Get it green * More tests * Handle more feedback * More test cleanup * Set the moduleResolution for the tsconfigs Co-authored-by: Wesley Wigham <wwigham@gmail.com>
This commit is contained in:
@@ -3139,6 +3139,11 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
// Without a package name, for multiple files being bundled into a .d.ts file you basically get a file which doesn't wrk
|
||||
if (outputFile && getEmitDeclarations(options) && getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs && !options.bundledPackageName) {
|
||||
createDiagnosticForOptionName(Diagnostics.The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit, options.out ? "out" : "outFile");
|
||||
}
|
||||
|
||||
if (options.resolveJsonModule) {
|
||||
if (getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeJs) {
|
||||
createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule");
|
||||
|
||||
Reference in New Issue
Block a user