Updating typing.

This commit is contained in:
mike12345567 2024-11-07 17:01:30 +00:00
parent 7c2bfec22c
commit 4c7103e5fd
2 changed files with 8 additions and 6 deletions

View File

@ -134,6 +134,12 @@ export const JsonTypes = [
FieldType.ARRAY, FieldType.ARRAY,
] ]
export type FormulaResponseType =
| FieldType.STRING
| FieldType.NUMBER
| FieldType.BOOLEAN
| FieldType.DATETIME
export const NumericTypes = [FieldType.NUMBER, FieldType.BIGINT] export const NumericTypes = [FieldType.NUMBER, FieldType.BIGINT]
export function isNumeric(type: FieldType) { export function isNumeric(type: FieldType) {

View File

@ -1,6 +1,6 @@
// all added by grid/table when defining the // all added by grid/table when defining the
// column size, position and whether it can be viewed // column size, position and whether it can be viewed
import { FieldType } from "../row" import { FieldType, FormulaResponseType } from "../row"
import { import {
AutoFieldSubType, AutoFieldSubType,
AutoReason, AutoReason,
@ -115,11 +115,7 @@ export interface FormulaFieldMetadata extends BaseFieldSchema {
type: FieldType.FORMULA type: FieldType.FORMULA
formula: string formula: string
formulaType?: FormulaType formulaType?: FormulaType
responseType?: responseType?: FormulaResponseType
| FieldType.STRING
| FieldType.NUMBER
| FieldType.BOOLEAN
| FieldType.DATETIME
} }
export interface AIFieldMetadata extends BaseFieldSchema { export interface AIFieldMetadata extends BaseFieldSchema {