File tree 1 file changed +26
-0
lines changed
packages/bundle-source/test
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change
1
+ /* eslint-disable */
2
+ import { expectType } from 'tsd' ;
3
+ import { type BundleSourceResult } from '../src' ;
4
+
5
+ expectType < BundleSourceResult < 'endoZipBase64' > > ( {
6
+ moduleFormat : 'endoZipBase64' ,
7
+ endoZipBase64 : '' ,
8
+ endoZipBase64Sha512 : '' ,
9
+ } ) ;
10
+
11
+ expectType < BundleSourceResult < 'endoZipBase64' > > ( {
12
+ moduleFormat : 'endoZipBase64' ,
13
+ endoZipBase64 : '' ,
14
+ endoZipBase64Sha512 : '' ,
15
+ } ) ;
16
+
17
+ expectType < BundleSourceResult < 'endoZipBase64' > > ( {
18
+ moduleFormat : 'endoZipBase64' ,
19
+ endoZipBase64 : '' ,
20
+ // @ts -expect-error must be string
21
+ endoZipBase64Sha512 : undefined ,
22
+ } ) ;
23
+
24
+ // a 'test' bundle is importable but not a BundleSource result
25
+ // @ts -expect-error Type '"test"' does not satisfy the constraint 'ModuleFormat'.
26
+ type TestBundle = BundleSourceResult < 'test' > ;
You can’t perform that action at this time.
0 commit comments