edgedb-js icon indicating copy to clipboard operation
edgedb-js copied to clipboard

Add link properties to interfaces generator

Open scotttrinh opened this issue 2 years ago • 1 comments

We do not currently generate properties for link properties in our interfaces generator. We should!

Open question: Do we need a special helper type to remove these properties?

scotttrinh avatar Jun 02 '23 13:06 scotttrinh

Thanks for creating this, I followed your advice regarding how I can work around this for now and it worked, I'll post this here for people who might be facing the same issue:

I created a separate file and declared a module. The edgedb generated file is called "schema.ts" and the new file is called "extendedSchema.d.ts"

Code:

// extendedSchema.d.ts

import type { Player } from "./schema";


declare module "./schema" {
    interface Player {
       bounty?:number
    }
}

pheeya avatar Jun 02 '23 13:06 pheeya