vite-plugin-type-to-schema
Advanced tools
Comparing version 0.0.1 to 0.0.2
import { Config } from 'ts-json-schema-generator'; | ||
import { Plugin } from 'vite'; | ||
declare type IConfig = { | ||
type IConfig = { | ||
/** | ||
@@ -6,0 +6,0 @@ * Import path suffix |
@@ -43,4 +43,4 @@ // src/index.ts | ||
return { | ||
suffix: (config == null ? void 0 : config.suffix) || "?schema", | ||
options: (config == null ? void 0 : config.options) || {}, | ||
suffix: config?.suffix || "?schema", | ||
options: config?.options || {}, | ||
dts | ||
@@ -47,0 +47,0 @@ }; |
{ | ||
"name": "vite-plugin-type-to-schema", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -48,9 +48,9 @@ "type": "module", | ||
"dependencies": { | ||
"ts-json-schema-generator": "^1.1.1" | ||
"ts-json-schema-generator": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^18.7.19", | ||
"@types/node": "^18.15.10", | ||
"module-from-string": "^3.3.0", | ||
"rimraf": "^3.0.2", | ||
"tsup": "^6.2.3", | ||
"tsup": "^6.7.0", | ||
"vite": "^2.9.0", | ||
@@ -57,0 +57,0 @@ "vitest": "^0.23.4" |
@@ -24,3 +24,3 @@ # Vite-plugin-type-to-schema | ||
[Source](./src/types.ts#L12) | ||
## name(optionality): defaultValue // Description | ||
#### name(optionality): defaultValue // Description | ||
```js | ||
@@ -33,1 +33,5 @@ typeToSchema({ | ||
``` | ||
## 📃 Details | ||
See [this test](./tests/compile.test.ts) and [fixture](./tests/fixtures/richType.ts) to learn behaviour of schema compiling |
7588
35