schemastery icon indicating copy to clipboard operation
schemastery copied to clipboard

Type driven schema validator

Results 15 schemastery issues
Sort by recently updated
recently updated
newest added

```ts export interface Config { autoLogin: boolean loginUsername: string loginPassword: string } export const Config: Schema = Schema.intersect([ Schema.object({ autoLogin: Schema.boolean().description('是否在 auth 开启时自动登录').default(false), }), Schema.union([ Schema.object({ autoLogin: Schema.const(true).required(), loginUsername: Schema.string().description('登录用户名').default('admin'),...

bug
types

配置範例如下 (使用官方參考的配置聯動2 + Array 形式) ```ts import { Context, Schema } from 'koishi' export const name = 'test' export interface ConfigRef { shared: string type: 'foo' | 'bar' | 'baz'...

### 当前行为 目前进行 validate 时, NaN 也算作 Number 的合法值。 ### 预期行为 NaN 不算作 Number。

## Describe An interactive playground for Schemastery like Vue playground.

```typescript Schemastery.tuple([ Schemastery.number().label('胸围'), // 原为 xxx[0] Schemastery.number().label('腰围'), // 原为 xxx[1] Schemastery.number().label('臀围') // 原为 xxx[2] ]).label('三围') ```

things like assert. ```js Schema.object({ host: Schema.string().validationMessage('You must provide a valid hostname'), port: Schema.port().validationMessage('You must provide a port number'), }) ```

enhancement