summaryrefslogtreecommitdiff
path: root/js/resources.ts
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2019-03-10 04:30:38 +1100
committerRyan Dahl <ry@tinyclouds.org>2019-03-09 12:30:38 -0500
commit034e2cc02829c9244b32232074c7a48af827a2fb (patch)
treebade01606a1ee076c1f753ce99c97ddb1e4edf30 /js/resources.ts
parent8c7a12d1b258f0ef5ab27f49c424331d43e8d97f (diff)
Migrate from tslint to eslint for linting (#1905)
Diffstat (limited to 'js/resources.ts')
-rw-r--r--js/resources.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/resources.ts b/js/resources.ts
index 0c62c2116..2cabd26dc 100644
--- a/js/resources.ts
+++ b/js/resources.ts
@@ -4,7 +4,9 @@ import * as flatbuffers from "./flatbuffers";
import { assert } from "./util";
import * as dispatch from "./dispatch";
-export type ResourceMap = { [rid: number]: string };
+export interface ResourceMap {
+ [rid: number]: string;
+}
/** Returns a map of open _file like_ resource ids along with their string
* representation.
@@ -19,7 +21,7 @@ export function resources(): ResourceMap {
const res = new msg.ResourcesRes();
assert(baseRes!.inner(res) !== null);
- const resources = {} as ResourceMap;
+ const resources: ResourceMap = {};
for (let i = 0; i < res.resourcesLength(); i++) {
const item = res.resources(i)!;