Commit 5b1ca3c4 authored by nanahira's avatar nanahira

readme

parent 6573aee7
Pipeline #6131 passed with stages
in 1 minute and 45 seconds
......@@ -59,7 +59,7 @@ export class Config {
```ts
// 获取 Schema 定义
const schema = schemaFromClass(B);
const schema = schemaFromClass(Config);
// 直接获取 Config 对象并实例化,可以代替 Schema.validate 使用。对于嵌套类会进行循环实例化。
const config = schemaTransform(B, someObject);
const config = schemaTransform(Config, someObject);
```
\ No newline at end of file
{
"name": "koishi-utils-schemagen",
"version": "1.0.3",
"version": "1.0.4",
"description": "在 Koishi.js 中,使用类装饰器定义 Schema",
"main": "dist/src/index.js",
"typings": "dist/src/index.d.ts",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment