Skip to content

Type inference issue in RenderService  #24

@VarunGitGood

Description

@VarunGitGood

So while working on the new RenderService i've run into a snag and typescript is incorrectly infering the type

so
image
Here when i call the template from an external service ( template ) typescript only infers the scalars rather than transformers as well

This is the inferred type

    createdAt: Date;
    updatedAt: Date;
    id: bigint;
    type: TemplateType;
    useCase: string;
    body: string;
    meta: Prisma.JsonValue;
    user: string;
    tag: string[];
}, unknown> & {}

And if i call it directly in the Service itself like this
image

this is the inferred type

    transformers: ({
        transformer: GetResult<{
            createdAt: Date;
            updatedAt: Date;
            id: bigint;
            type: TransformerType;
            meta: Prisma.JsonValue;
            sampleData: Prisma.JsonValue;
            functionDID: string;
        }, unknown> & {};
    } & GetResult<...> & {})[];
} & GetResult<...> & {}

could i get some possible solutions here thanks!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions