Skip to content

Commit 8b5436d

Browse files
committed
function type
1 parent 8d0342e commit 8b5436d

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

packages/core/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export declare interface BaseCreateOptions {
1515
}
1616
}
1717
onCreateWorker?: () => any
18-
print?: () => void
19-
printErr?: () => void
18+
print?: (str: string) => void
19+
printErr?: (str: string) => void
2020
}
2121

2222
export declare type CreateOptions = BaseCreateOptions & ({

packages/emnapi/src/core/init.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ declare interface CreateOptions {
88
nodeBinding?: NodeBinding
99
childThread?: boolean
1010
onCreateWorker?: () => any
11-
print?: () => void
12-
printErr?: () => void
11+
print?: (str: string) => void
12+
printErr?: (str: string) => void
1313
postMessage?: (msg: any) => any
1414
}
1515

@@ -34,9 +34,6 @@ declare interface INapiModule {
3434
loaded: boolean
3535
filename: string
3636
childThread: boolean
37-
// PThread: {
38-
// pthreads: any[]
39-
// }
4037
envObject?: Env
4138

4239
init (options: InitOptions): any
@@ -78,9 +75,6 @@ var napiModule: INapiModule = {
7875
filename: '',
7976
childThread: Boolean(options.childThread),
8077

81-
// PThread: {
82-
// pthreads: [undefined]
83-
// },
8478
spawnThread: undefined!,
8579

8680
init (options: InitOptions) {

0 commit comments

Comments
 (0)