refactor: types refactor
This commit is contained in:
@@ -40,7 +40,7 @@ export function createAsyncComponent(
|
||||
error: errorComp
|
||||
} = options
|
||||
|
||||
return class AsyncContainer extends Component<AsyncContainerData> {
|
||||
return class AsyncContainer extends Component<{}, AsyncContainerData> {
|
||||
data() {
|
||||
return {
|
||||
comp: null,
|
||||
|
||||
@@ -8,7 +8,7 @@ interface ProviderProps {
|
||||
value: any
|
||||
}
|
||||
|
||||
export class Provide extends Component<{}, ProviderProps> {
|
||||
export class Provide extends Component<ProviderProps> {
|
||||
updateValue() {
|
||||
// TS doesn't allow symbol as index :/
|
||||
// https://github.com/Microsoft/TypeScript/issues/24587
|
||||
|
||||
@@ -15,7 +15,7 @@ type Cache = Map<CacheKey, VNode>
|
||||
|
||||
export const KeepAliveSymbol = Symbol()
|
||||
|
||||
export class KeepAlive extends Component<{}, KeepAliveProps> {
|
||||
export class KeepAlive extends Component<KeepAliveProps> {
|
||||
cache: Cache = new Map()
|
||||
keys: Set<CacheKey> = new Set()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user