-
-
Notifications
You must be signed in to change notification settings - Fork 134
Open
Description
After executing npx tsc, jsdoc is lost
input:
import { type } from 'arktype';
export const UserSchema = type({
/** User name */
name: 'string',
/** Age (optional) */
'age?': 'number',
});
export type UserType = typeof UserSchema.infer;output:
export declare const UserSchema: import("arktype/internal/variants/object.ts").ObjectType<{
name: string;
age?: number | undefined;
}, {}>;
export type UserType = typeof UserSchema.infer;my tsconfig is
{
"compilerOptions": {
"strict": true,
"preserveSymlinks": false,
"target": "ESNext",
"moduleResolution": "bundler",
"outDir": "lib",
"declaration": true,
}
}If I set preserveSymlinks to true, the generated dts retains the jsdoc, but is actually wrong. So, is there a better way I can do this? I don't want to declare interface separately, but through typeof schema.infer
Thank you very much for your efforts. This library has helped me a lot.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
To do