egg_server/types/sheetProxy.ts
zhaoyingbo 35da14f32c
Some checks failed
Egg Server MIflow / build-image (push) Failing after 32s
feat(sheet): 支持创建多维表格
2024-09-23 12:10:58 +00:00

23 lines
445 B
TypeScript

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