Add type annotations (#562)

This commit is contained in:
woxtu
2022-06-29 04:17:23 +09:00
committed by GitHub
parent dc84d7c1b5
commit 506ac2574f
5 changed files with 19 additions and 9 deletions

View File

@@ -101,9 +101,10 @@ export class PyodideRuntime extends Object {
pyodide.globals.set('pyscript_loader', loader);
loader?.log('Runtime created...');
loadedEnvironments.update((value: any): any => {
value[newEnv['id']] = newEnv;
});
loadedEnvironments.update(environments => ({
...environments,
[newEnv['id']]: newEnv,
}));
// now we call all initializers before we actually executed all page scripts
loader?.log('Initializing components...');