chore: redeclare typings

This commit is contained in:
草鞋没号 2021-06-23 10:58:52 +08:00
parent c082cb08e6
commit 0f390defd5
6 changed files with 36 additions and 20 deletions

View File

@ -1,11 +0,0 @@
// declare const React: string
declare module '*.json'
declare module '*.png'
declare module '*.jpg'
interface Window {
/** 关闭预加载动画 */
ClosePreloadLoading: () => void
}

View File

@ -17,8 +17,5 @@
"@root/*": ["./*"] "@root/*": ["./*"]
}, },
"allowSyntheticDefaultImports": true "allowSyntheticDefaultImports": true
}, }
"include": [
"src"
]
} }

24
typings/assets.d.ts vendored Normal file
View File

@ -0,0 +1,24 @@
declare module '*.png' {
const src: string
export default src
}
declare module '*.jpg' {
const src: string
export default src
}
declare module '*.gif' {
const src: string
export default src
}
declare module '*.webp' {
const src: string
export default src
}
declare module '*.svg' {
const src: string
export default src
}

11
typings/global.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
declare namespace NodeJS {
interface ProcessEnv {
readonly NODE_ENV: 'development' | 'production'
}
}
interface Window {
/** 关闭预加载动画 */
removeLoading: () => void
}

View File

@ -1,5 +0,0 @@
interface Window {
/** 浏览器下开发,关闭 electron 载入动画 */
stopLoading: () => void
}