1
Fork 0

typescript(translucid): hate it even more (jk)

Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
Matei Adriel 2019-01-22 21:06:48 +02:00 committed by prescientmoon
parent 0000de95cf
commit 00abe6ef08
Signed by: prescientmoon
SSH key fingerprint: SHA256:UUF9JT2s8Xfyv76b8ZuVL7XrmimH4o49p4b+iexbVH4
2 changed files with 4 additions and 4 deletions

View file

@ -25,8 +25,8 @@ class Translucid {
const object = JSON.parse(json); const object = JSON.parse(json);
for (let i in object) { for (let i in object) {
const classes = object[i].classes || []; const classes = object[i].classes || [];
this.bind(object[i].path, object[i].file, classes); this.bind(i, object[i].file, classes);
console.log(`Binded room with name ${object[i].file} and path ${object[i].filepath} with classes ${classes}`); console.log(`Binded room with name ${i} and path ${object[i].path} with classes ${classes}`);
} }
} }
bind(path = "/", filepath = "", classes = []) { bind(path = "/", filepath = "", classes = []) {

View file

@ -30,8 +30,8 @@ class Translucid {
for (let i in object){ for (let i in object){
const classes = object[i].classes || []; const classes = object[i].classes || [];
this.bind(object[i].path,object[i].file,classes); this.bind(i,object[i].file,classes);
console.log(`Binded room with name ${object[i].file} and path ${object[i].filepath} with classes ${classes}`) console.log(`Binded room with name ${i} and path ${object[i].path} with classes ${classes}`)
} }
} }
bind(path:string = "/", filepath:string = "", classes:Array<string> = []):void{ bind(path:string = "/", filepath:string = "", classes:Array<string> = []):void{