TypeScript/tests/baselines/reference/grammarErrors.js
Andrew Branch 69bc3f3b0c
Allow type-only imports on ImportEqualsDeclarations (#41573)
* 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
2020-12-03 13:27:15 -08:00

35 lines
601 B
TypeScript

//// [tests/cases/conformance/externalModules/typeOnly/grammarErrors.ts] ////
//// [a.ts]
export default class A {}
export class B {}
export class C {}
//// [b.ts]
import type A, { B, C } from './a';
//// [a.js]
import type A from './a';
export type { A };
//// [c.ts]
namespace ns {
export class Foo {}
}
import type Foo = ns.Foo;
//// [b.js]
"use strict";
exports.__esModule = true;
//// [c.js]
var ns;
(function (ns) {
var Foo = /** @class */ (function () {
function Foo() {
}
return Foo;
}());
ns.Foo = Foo;
})(ns || (ns = {}));