-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
- vue
useRef
import { ref } from 'vue'
export function useRef<T extends abstract new(...args: any) => any>(_component: T) {
return ref<InstanceType<T>>()
}Omit,Partial,Pick的使用
interface Article {
author: string,
date: Date,
readCount: number,
}
type Optional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
type CreateArticle = Optional<Article, 'author' | 'date' | 'readCount'>;
function createArticle(article: CreateArticle) {}Metadata
Metadata
Assignees
Labels
No labels