Remove TypeScript-specific static Compress import (#338)
Previously, Compress had a static import only used by TypeScript, as the module was loaded dynamically. The type can be replaced with `import().default`. TypeScript 2.9 introduced the ability to use `import()` within type statements. https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
This commit is contained in:

committed by
Jake Archibald

parent
b3ab983f02
commit
32f2b4e573
@ -9,9 +9,6 @@ import '../../lib/SnackBar';
|
||||
import Intro from '../intro';
|
||||
import '../custom-els/LoadingSpinner';
|
||||
|
||||
// This is imported for TypeScript only. It isn't used.
|
||||
import Compress from '../compress';
|
||||
|
||||
const compressPromise = import(
|
||||
/* webpackChunkName: "main-app" */
|
||||
'../compress',
|
||||
@ -31,7 +28,7 @@ interface Props {}
|
||||
|
||||
interface State {
|
||||
file?: File | Fileish;
|
||||
Compress?: typeof Compress;
|
||||
Compress?: typeof import('../compress').default;
|
||||
}
|
||||
|
||||
export default class App extends Component<Props, State> {
|
||||
|
Reference in New Issue
Block a user