wip fix typings
This commit is contained in:
parent
e8bff5c002
commit
a01906e275
|
|
@ -1,7 +1,10 @@
|
||||||
import trim from "lodash.trim";
|
import trim from "lodash.trim";
|
||||||
import { isValidElement } from "react";
|
import { isValidElement } from "react";
|
||||||
|
|
||||||
export const extractProp = (prop: { values: Record<string, any> }) => {
|
export const extractProp = (prop: {
|
||||||
|
values: Record<string, any>;
|
||||||
|
types: Record<string, string>;
|
||||||
|
}) => {
|
||||||
const propTypes: string[] = [];
|
const propTypes: string[] = [];
|
||||||
const props: Record<string, { val?: any; type?: string }> = {};
|
const props: Record<string, { val?: any; type?: string }> = {};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ declare module "ts:runtime/library" {
|
||||||
`\
|
`\
|
||||||
declare module "ts:prisma" {
|
declare module "ts:prisma" {
|
||||||
${prisma["prisma.d.ts"].replace(
|
${prisma["prisma.d.ts"].replace(
|
||||||
`import * as runtime from './runtime/library';`,
|
`import * as runtime from './runtime/library.js';`,
|
||||||
`import * as runtime from 'ts:runtime/library';`
|
`import * as runtime from 'ts:runtime/library';`
|
||||||
)}
|
)}
|
||||||
}`,
|
}`,
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export const monacoTypings = async (
|
||||||
if (!map.has(prop.values)) {
|
if (!map.has(prop.values)) {
|
||||||
map.set(prop.values, true);
|
map.set(prop.values, true);
|
||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const prasi_api = w.prasiApi[p.site.api_url];
|
const prasi_api = w.prasiApi[p.site.api_url];
|
||||||
|
|
@ -50,10 +50,15 @@ declare module "ts:runtime/library" {
|
||||||
monaco,
|
monaco,
|
||||||
`\
|
`\
|
||||||
declare module "ts:prisma" {
|
declare module "ts:prisma" {
|
||||||
${prisma["prisma.d.ts"].replace(
|
${prisma["prisma.d.ts"]
|
||||||
`import * as runtime from './runtime/library';`,
|
.replace(
|
||||||
`import * as runtime from 'ts:runtime/library';`
|
`import * as runtime from './runtime/library.js';`,
|
||||||
)}
|
`import * as runtime from 'ts:runtime/library';`
|
||||||
|
)
|
||||||
|
.replace(
|
||||||
|
`import * as runtime from './runtime/library';`,
|
||||||
|
`import * as runtime from 'ts:runtime/library';`
|
||||||
|
)}
|
||||||
}`,
|
}`,
|
||||||
`ts:prisma.d.ts`
|
`ts:prisma.d.ts`
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue