Closed chiubaca closed 1 year ago
I'm using Typescript and trying to apply anexternal_id property when adding a new product and noticing TS errors :
external_id
Type '{ title: string; handle: string; thumbnail: string | undefined; options: { title: string; }[]; profile_id: string; external_id: string; metadata: { printful_id: number | undefined; }; }' is not assignable to type 'CreateProductInput'.
Is this perhaps just a mistyping in CreateProductInput interface ?
Medusa version (including plugins): Node.js version: v16.13.0 Database: 1.5.0 Operating system: mac OS
create new CreateProductInput like so:
CreateProductInput
import { CreateProductInput } from "@medusajs/medusa/dist/types/product"; const productDataNew: CreateProductInput = { title: "product name", external_id: "external-id", };
There should not be any TS errors.
A quick fix here if so - https://github.com/medusajs/medusa/pull/2498
Bug report
Describe the bug
I'm using Typescript and trying to apply an
external_id
property when adding a new product and noticing TS errors :Is this perhaps just a mistyping in CreateProductInput interface ?
System information
Medusa version (including plugins): Node.js version: v16.13.0 Database: 1.5.0 Operating system: mac OS
Steps to reproduce the behaviour
create new
CreateProductInput
like so:Expected behaviour
There should not be any TS errors.