File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ npm install --save @json-types/$name
99## Usage
1010
1111``` ts
12- import { Compose } from " @json-types/$name" ;
12+ import { $importName } from " @json-types/$name" ;
1313```
1414
1515## Details
Original file line number Diff line number Diff line change @@ -33,11 +33,12 @@ export async function gen() {
3333
3434 if ( type . patches ?. removeYamlAnchor ) dropYamlAnchor ( newSchema ) ;
3535
36+ const importName = capitalize ( camelize ( type . name ) ) ;
3637 const oldIndexDef = await readFileIfExists ( join ( path , "index.d.ts" ) ) ;
3738 const newIndexDef = await compile (
3839 {
3940 ...newSchema ,
40- title : capitalize ( camelize ( type . name ) ) ,
41+ title : importName ,
4142 } ,
4243 "schema.json" ,
4344 {
@@ -105,6 +106,7 @@ export async function gen() {
105106 ] ,
106107 } ,
107108 "README.md" : await renderTpl ( "./scripts/README.tpl.md" , {
109+ $importName : importName ,
108110 $name : type . name ,
109111 $url : type . url ,
110112 $lastChangeDate : lastChangeDate ,
You can’t perform that action at this time.
0 commit comments