> A mismatch would mean you would get type errors inside the library code
OP doesn't want the types to be checked, they want the types to be stripped. Type stripping ignores tsconfig.json files and any of its features, see: https://nodejs.org/api/typescript.html#type-stripping
Yes, but your TypeScript code has to be checked against the libraries in node_modules, and it is significantly costlier to check against implementation files (the .ts/.mts files) than the produced declaration files (the .d.ts files).
Type stripping cannot ignore tsconfig.
TypeScript has different semantics depending on settings in tsconfig e.g. useDefineForClassFields