wip fix typings

This commit is contained in:
Rizky 2024-02-07 05:51:43 +07:00
parent e8bff5c002
commit a01906e275
3 changed files with 15 additions and 7 deletions

View File

@ -1,7 +1,10 @@
import trim from "lodash.trim";
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 props: Record<string, { val?: any; type?: string }> = {};

View File

@ -47,7 +47,7 @@ declare module "ts:runtime/library" {
`\
declare module "ts:prisma" {
${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';`
)}
}`,

View File

@ -50,7 +50,12 @@ declare module "ts:runtime/library" {
monaco,
`\
declare module "ts:prisma" {
${prisma["prisma.d.ts"].replace(
${prisma["prisma.d.ts"]
.replace(
`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';`
)}