69bc3f3b0c
* Allow type-only ImportEqualsDeclarations * Suppress CJS-in-ESM error when type-only * Add grammar error on import type in import alias * Update API baselines * Fix importsNotUsedAsValues with ImportEqualsDeclarations * Make bad error talk words more good for Daniel. Fixes #41603 * One more error message baseline update * Update transformer and emitter
15 lines
344 B
TypeScript
15 lines
344 B
TypeScript
//// [tests/cases/conformance/externalModules/typeOnly/cjsImportInES2015.ts] ////
|
|
|
|
//// [index.d.ts]
|
|
declare class SpecialError extends Error {}
|
|
export = SpecialError;
|
|
|
|
//// [index.ts]
|
|
import type SpecialError = require("cjs-dep");
|
|
function handleError(err: SpecialError) {}
|
|
|
|
|
|
//// [index.js]
|
|
function handleError(err) { }
|
|
export {};
|