parent
cb44125a21
commit
9e7b02d50e
|
@ -694,7 +694,13 @@ function genericPrintNoParens(path, options, print, args) {
|
|||
}
|
||||
|
||||
parts.push(" ", "from ");
|
||||
} else if (n.importKind && n.importKind === "type") {
|
||||
} else if (
|
||||
(n.importKind && n.importKind === "type") ||
|
||||
// import {} from 'x'
|
||||
/{\s*}/.test(
|
||||
options.originalText.slice(util.locStart(n), util.locStart(n.source))
|
||||
)
|
||||
) {
|
||||
parts.push("{} from ");
|
||||
}
|
||||
|
||||
|
|
|
@ -228,6 +228,20 @@ import {
|
|||
|
||||
`;
|
||||
|
||||
exports[`empty-import.js 1`] = `
|
||||
import { } from '@types/googlemaps';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
import {} from "@types/googlemaps";
|
||||
|
||||
`;
|
||||
|
||||
exports[`empty-import.js 2`] = `
|
||||
import { } from '@types/googlemaps';
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
import {} from "@types/googlemaps";
|
||||
|
||||
`;
|
||||
|
||||
exports[`inline.js 1`] = `
|
||||
import somethingSuperLongsomethingSuperLong from 'somethingSuperLongsomethingSuperLongsomethingSuperLong'
|
||||
import {somethingSuperLongsomethingSuperLong} from 'somethingSuperLongsomethingSuperLongsomethingSuperLong'
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
import { } from '@types/googlemaps';
|
Loading…
Reference in New Issue