-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
typescript: fix uppy package use with allowSyntheticImports: false
Synthetic default imports allow you to `import X from 'x'` if `'x'` is a CommonJS module. Our `uppy` package relied on that (probably forgot to update it in a previous patch). If users had set `allowSyntheticDefaultImports: false`, they would not be able to use the `uppy` package. We should at some point go through the typings again and set everything to the tightest options, because that'll work with the widest array of users, but for now let's just unbreak this particular case. Fixes #1395
- Loading branch information
1 parent
6cc7c00
commit 5709647
Showing
6 changed files
with
41 additions
and
39 deletions.
There are no files selected for viewing
16 changes: 8 additions & 8 deletions
16
packages/@uppy/aws-s3-multipart/types/aws-s3-multipart-tests.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import Uppy, { UppyFile } from '@uppy/core'; | ||
import AwsS3Multipart, { AwsS3Part } from '../'; | ||
import Uppy = require('@uppy/core'); | ||
import AwsS3Multipart = require('../'); | ||
|
||
{ | ||
const uppy = Uppy(); | ||
uppy.use(AwsS3Multipart, { | ||
createMultipartUpload(file) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
}, | ||
listParts(file, opts) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
opts.uploadId // $ExpectType string | ||
opts.key // $ExpectType string | ||
}, | ||
prepareUploadPart(file, part) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
part.uploadId // $ExpectType string | ||
part.key // $ExpectType string | ||
part.body // $ExpectType Blob | ||
part.number // $ExpectType number | ||
}, | ||
abortMultipartUpload(file, opts) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
opts.uploadId // $ExpectType string | ||
opts.key // $ExpectType string | ||
}, | ||
completeMultipartUpload(file, opts) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
opts.uploadId // $ExpectType string | ||
opts.key // $ExpectType string | ||
opts.parts[0] // $ExpectType AwsS3Part | ||
opts.parts[0] // $ExpectType AwsS3Multipart.AwsS3Part | ||
}, | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import Uppy, { UppyFile } from '@uppy/core'; | ||
import AwsS3 from '../'; | ||
import Uppy = require('@uppy/core'); | ||
import AwsS3 = require('../'); | ||
|
||
{ | ||
const uppy = Uppy(); | ||
uppy.use(AwsS3, { | ||
getUploadParameters(file) { | ||
file // $ExpectType UppyFile | ||
file // $ExpectType Uppy.UppyFile | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters