From 0ab6a93e0cbfef942946aae05c56315c1015080f Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 30 Aug 2020 16:07:53 +1000 Subject: [PATCH] Update runtime defs Use runtime.Store instead of wails.Store --- cmd/templates/vanilla/frontend/src/main.js | 2 +- runtime/js/runtime/runtime.d.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/templates/vanilla/frontend/src/main.js b/cmd/templates/vanilla/frontend/src/main.js index 90d423d8..6e4a3729 100644 --- a/cmd/templates/vanilla/frontend/src/main.js +++ b/cmd/templates/vanilla/frontend/src/main.js @@ -4,7 +4,7 @@ const runtime = require('@wailsapp/runtime'); // Main entry point function start() { - var mystore = wails.Store.New('Counter'); + var mystore = runtime.Store.New('Counter'); // Ensure the default app div is 100% wide/high var app = document.getElementById('app'); diff --git a/runtime/js/runtime/runtime.d.ts b/runtime/js/runtime/runtime.d.ts index 6a8f716e..21e07da5 100644 --- a/runtime/js/runtime/runtime.d.ts +++ b/runtime/js/runtime/runtime.d.ts @@ -21,6 +21,9 @@ declare const wailsapp__runtime: { Info(message: string): void; Warning(message: string): void; }; + Store: { + New(name: string, optionalDefault?: any): any; + }; };