fix(cli): generated type def on multi impl blocks
This commit is contained in:
parent
cc79c9794e
commit
c3a35a0704
4 changed files with 7 additions and 1 deletions
|
@ -592,7 +592,11 @@ async function processIntermediateTypeFile(
|
|||
})
|
||||
break
|
||||
case 'impl':
|
||||
impls.set(def.name, `${def.js_doc}${def.def}`)
|
||||
const existed = impls.get(def.name)
|
||||
impls.set(
|
||||
def.name,
|
||||
`${existed ? existed + '\n' : ''}${def.js_doc}${def.def}`,
|
||||
)
|
||||
break
|
||||
case 'interface':
|
||||
dts +=
|
||||
|
|
|
@ -217,6 +217,7 @@ Generated by [AVA](https://avajs.dev).
|
|||
export type Blake2bHasher = Blake2BHasher␊
|
||||
/** Smoking test for type generation */␊
|
||||
export class Blake2BHasher {␊
|
||||
static withKey(key: Blake2bKey): Blake2BHasher␊
|
||||
update(data: Buffer): void␊
|
||||
}␊
|
||||
export type Blake2bKey = Blake2BKey␊
|
||||
|
|
Binary file not shown.
1
examples/napi/index.d.ts
vendored
1
examples/napi/index.d.ts
vendored
|
@ -207,6 +207,7 @@ export class Bird {
|
|||
export type Blake2bHasher = Blake2BHasher
|
||||
/** Smoking test for type generation */
|
||||
export class Blake2BHasher {
|
||||
static withKey(key: Blake2bKey): Blake2BHasher
|
||||
update(data: Buffer): void
|
||||
}
|
||||
export type Blake2bKey = Blake2BKey
|
||||
|
|
Loading…
Reference in a new issue