From b0a23beb8fae964be3cdd8c23c38af66257d34c7 Mon Sep 17 00:00:00 2001 From: andy finch Date: Mon, 1 Apr 2019 15:09:59 -0400 Subject: Add web worker JS API (#1993) * Refactored the way worker polling is scheduled and errors are handled. * Share the worker future as a Shared --- tools/ts_library_builder/ast_util.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/ts_library_builder/ast_util.ts') diff --git a/tools/ts_library_builder/ast_util.ts b/tools/ts_library_builder/ast_util.ts index d195da721..14546f9c5 100644 --- a/tools/ts_library_builder/ast_util.ts +++ b/tools/ts_library_builder/ast_util.ts @@ -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 -- cgit v1.2.3