mirror of
https://github.com/denoland/deno.git
synced 2025-09-29 13:44:47 +00:00
Add web worker JS API (#1993)
* Refactored the way worker polling is scheduled and errors are handled. * Share the worker future as a Shared
This commit is contained in:
parent
659acadf77
commit
b0a23beb8f
28 changed files with 1013 additions and 257 deletions
|
@ -94,11 +94,14 @@ export function addVariableDeclaration(
|
|||
node: StatementedNode,
|
||||
name: string,
|
||||
type: string,
|
||||
isConst: boolean,
|
||||
hasDeclareKeyword?: boolean,
|
||||
jsdocs?: JSDoc[]
|
||||
): VariableStatement {
|
||||
return node.addVariableStatement({
|
||||
declarationKind: VariableDeclarationKind.Const,
|
||||
declarationKind: isConst
|
||||
? VariableDeclarationKind.Const
|
||||
: VariableDeclarationKind.Let,
|
||||
declarations: [{ name, type }],
|
||||
docs: jsdocs && jsdocs.map(jsdoc => jsdoc.getText()),
|
||||
hasDeclareKeyword
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue