typescript(translucid): hate it even more (jk)
Signed-off-by: prescientmoon <git@moonythm.dev>
This commit is contained in:
parent
0000de95cf
commit
00abe6ef08
|
@ -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 = []) {
|
||||||
|
|
|
@ -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{
|
||||||
|
|
Loading…
Reference in a new issue