Comparing version 0.2.9 to 0.2.10
@@ -5,3 +5,3 @@ declare type JSValue = string | number | bigint | boolean | symbol | Function | Array<any> | undefined | object | null; | ||
interface TypeDescriptor { | ||
type?: JSType | JSType[]; | ||
type?: JSType | JSType[] | string | string[]; | ||
items?: TypeDescriptor | TypeDescriptor[]; | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "untyped", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": "unjs/untyped", |
@@ -95,3 +95,3 @@ # untyped | ||
```js | ||
import { resolveSchema } from 'untyped' | ||
import { resolveSchema, generateTypes } from 'untyped' | ||
@@ -121,2 +121,31 @@ const types = generateTypes(resolveSchema(defaultPlanet)) | ||
### Generating markdown | ||
```js | ||
import { resolveSchema, generateTypes, generateMarkdown } from 'untyped' | ||
const markdown = generateMarkdown(generateTypes(resolveSchema(defaultPlanet))) | ||
``` | ||
Output: | ||
```markdown | ||
# `name` | ||
- **Type**: `string` | ||
- **Default**: `"earth"` | ||
# `specs` | ||
## `gravity` | ||
- **Type**: `number` | ||
- **Default**: `9.8` | ||
## `moons` | ||
- **Type**: `array` | ||
- **Default**: `["moon"]` | ||
``` | ||
## Contribution | ||
@@ -123,0 +152,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36043
177
0
3123502
8