export namespace SheetProxy { export enum Type { Insert = "insert", } export interface Body { api_key: string sheet_token: string type: "insert" range: string values: string[][] // 二维数组 } // 判断一个值是否是枚举中的值 export const isType = (value: any): value is Type => { return Object.values(Type).includes(value) } }