Skip to content

Commit

Permalink
feat(fr):修改schema类型声明
Browse files Browse the repository at this point in the history
  • Loading branch information
siyi98 committed Mar 22, 2022
1 parent 5797742 commit 2d05a4d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions packages/form-render/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
import { RuleItem } from 'async-validator';
import * as React from 'react';

export type SchemaType =
| 'string'
| 'object'
| 'array'
| 'number'
| 'boolean'
| 'void'
| 'date'
| 'datetime'
| (string & {})

interface SchemaBase {
type: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'range' | 'html';
type: SchemaType;
title: string;
description: string;
descType: 'text' | 'icon';
Expand Down Expand Up @@ -46,7 +57,7 @@ interface SchemaBase {
props: Record<string, any>;
}

type Schema = Partial<SchemaBase>;
export type Schema = Partial<SchemaBase>;

export interface Error {
/** 错误的数据路径 */
Expand Down

0 comments on commit 2d05a4d

Please sign in to comment.