@greenlabs/ppx-ts
Advanced tools
Comparing version 0.1.5 to 0.1.6
{ | ||
"name": "@greenlabs/ppx-ts", | ||
"version": "0.1.5", | ||
"version": "0.1.6", | ||
"description": "ReScript PPX helps binding to typescript modules", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -136,2 +136,3 @@ # PPX_ts | ||
@spice // attributes are available | ||
type t1 = %ppx_ts.keyOf(Error.t) // type t1 = Name | Age | ||
@@ -147,18 +148,2 @@ | ||
#### `toGeneric` | ||
```rescript | ||
type t = { | ||
name: string, | ||
age: int | ||
} | ||
type t1 = %ppx_ts.toGeneric(t) | ||
// changed | ||
type t1<'a> = { | ||
name: 'a | ||
age: 'a | ||
} | ||
``` | ||
#### `setType` | ||
@@ -200,2 +185,38 @@ | ||
#### `toGeneric` | ||
```rescript | ||
type t = { | ||
name: string, | ||
age: int | ||
} | ||
@spice // attributes are available | ||
type t1 = %ppx_ts.toGeneric(t) | ||
// generated | ||
type t1<'a> = { | ||
name: 'a | ||
age: 'a | ||
} | ||
``` | ||
#### `partial` | ||
```rescript | ||
type t = { | ||
name: string, | ||
age: int, | ||
isKorean: bool | ||
} | ||
@spice // attributes are available | ||
type t1 = %ppx_ts.partial(t) | ||
// generated | ||
type t1 = { | ||
name: option<string>, | ||
age: option<int>, | ||
isKorean: option<bool> | ||
} | ||
``` | ||
## Contribution | ||
@@ -202,0 +223,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
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
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
33391077
253