feat: small fixes + heap!

This commit is contained in:
mpaulson 2022-08-03 06:55:25 -06:00
parent 29ba2cd3ab
commit 7ffe2a8193

View file

@ -1,13 +1,8 @@
const length_property = { const length_property = {
getters: [{
name: "length",
return: "number",
prop_name: "_length",
}],
properties: [{ properties: [{
name: "_length", name: "length",
type: "number", type: "number",
scope: "private", scope: "public",
}] }]
}; };
const list_interface = { const list_interface = {
@ -40,6 +35,24 @@ const list_interface = {
}; };
module.exports = { module.exports = {
MinHeap: {
type: "class",
methods: [{
name: "push",
args: "value: number",
return: "void",
}, {
name: "delete",
args: "",
return: "number",
}],
properties: [{
name: "length",
type: "number",
scope: "public",
}]
},
Map: { Map: {
generic: "<T extends (string | number), V>", generic: "<T extends (string | number), V>",
type: "class", type: "class",
@ -76,15 +89,10 @@ module.exports = {
name: "pop", name: "pop",
return: "T | undefined", return: "T | undefined",
}], }],
getters: [{
name: "length",
return: "number",
prop_name: "_length",
}],
properties: [{ properties: [{
name: "_length", name: "length",
type: "number", type: "number",
scope: "private", scope: "public",
}] }]
}, },