fix
This commit is contained in:
parent
40df47cd2d
commit
3bd3ee0429
|
|
@ -7,6 +7,7 @@ type SingleExport = {
|
|||
val: string;
|
||||
};
|
||||
export const parseTypeDef = async (path: string) => {
|
||||
console.log("parsing", path);
|
||||
const ast = await parseFile(path, { syntax: "typescript" });
|
||||
|
||||
const exports = {} as Record<string, SingleExport[]>;
|
||||
|
|
|
|||
|
|
@ -94,9 +94,12 @@ export const initTypings = async (
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const res = JSON.stringify(await parseTypeDef(path));
|
||||
await Bun.write(
|
||||
dir.data(`/code/${id_site}/site/type_def.${file.lastModified}.json`),
|
||||
dir.data(
|
||||
`/code/${id_site}/site/type_def.${file.lastModified}.json`
|
||||
),
|
||||
res
|
||||
);
|
||||
|
||||
|
|
@ -115,6 +118,7 @@ export const initTypings = async (
|
|||
data: { ts: now, mode: "typings" },
|
||||
});
|
||||
});
|
||||
} catch (e) {}
|
||||
}, 180);
|
||||
});
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue