1 parent
38eec13a03
commit
faf2ac5f9e
2 files changed
+10
-2
No files matched your search
+9
-1
@@ -2414,7 +2414,15 @@ function genericPrintNoParens(path, options, print, args) {
|
||||
return concat(parts);
|
||||
case "TSNamespaceExportDeclaration":
|
||||
if (n.declaration) {
|
||||
parts.push("export ", path.call(print, "declaration"));
|
||||
// Temporary fix until https://github.com/eslint/typescript-eslint-parser/issues/263
|
||||
const isDefault = options.originalText
|
||||
.slice(util.locStart(n), util.locStart(n.declaration))
|
||||
.match(/\bdefault\b/);
|
||||
parts.push(
|
||||
"export ",
|
||||
isDefault ? "default " : "",
|
||||
path.call(print, "declaration")
|
||||
);
|
||||
} else {
|
||||
parts.push("export as namespace ", path.call(print, "name"));
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@ declare module "foo" {
|
||||
declare module "foo" {
|
||||
export var before: C;
|
||||
|
||||
export class C {
|
||||
export default class C {
|
||||
method(): C;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user