Skip to content

Commit

Permalink
clean before initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
Etienne Moureton committed Apr 4, 2023
1 parent 61f33e7 commit 478f3a0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ const fetchNewTypes = async ({ outDir = './types' }: fetchParameters = {}) => {
// handle 2nd level tree
if (t === type.object) {

t = new Map()
t = new Map();

for (const keyC in value) {
const vC = value[keyC];

let tC = findType(vC);
const tC = findType(vC);

if (!t.has(keyC)) {
t.set(keyC, [tC]);
Expand Down Expand Up @@ -83,10 +83,10 @@ const fetchNewTypes = async ({ outDir = './types' }: fetchParameters = {}) => {
if (value[0].kind) {
t = type.array(type[value[0].type]);
} else if (value[0] instanceof Map) {
const members = []
const members = [];
value[0].forEach((v, k) => {
members.push({ name: k, kind: 'property', type: type[v] })
})
members.push({ name: k, kind: 'property', type: type[v] });
});
t = create.objectType(members);
} else {
t = type[value[0]];
Expand Down

0 comments on commit 478f3a0

Please sign in to comment.