mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
Add TS types support for build (#28)
* build ts types. * fix default export for lib.
This commit is contained in:
@ -19,6 +19,8 @@ export async function getFilesFromDataTansfer(dataTransfer: DataTransfer): Promi
|
||||
}
|
||||
|
||||
const promises: Array<Promise<any>> = []
|
||||
// Type 'DataTransferItemList' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
|
||||
// @ts-ignore
|
||||
for (const item of dataTransfer.items) {
|
||||
if ('webkitGetAsEntry' in item) {
|
||||
promises.push(traverse(item.webkitGetAsEntry()))
|
||||
@ -29,6 +31,8 @@ export async function getFilesFromDataTansfer(dataTransfer: DataTransfer): Promi
|
||||
}
|
||||
|
||||
if (promises.length === 0) {
|
||||
// Type 'FileList' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
|
||||
// @ts-ignore
|
||||
return [...dataTransfer.files]
|
||||
}
|
||||
|
||||
|
@ -18,5 +18,4 @@ if (typeof window !== 'undefined' && window.Vue) {
|
||||
window.Vue.use(NekoElements, {})
|
||||
}
|
||||
|
||||
export { Neko }
|
||||
export default NekoElements
|
||||
export default Neko
|
Reference in New Issue
Block a user