Open dugip opened 2 months ago
Type 'Extract<keyof TEntity, string>' cannot be used to index type 'this'.
Please provide other information which led to this error, and any specific questions you have about it:
Sample code that causes this:
export class ComputedEntity<TEntity extends Record<string, any>> { constructor(protected schema: TEntity) { for (const prop in schema) { this[prop] = schema[prop]; } } }
Error Text
Type 'Extract<keyof TEntity, string>' cannot be used to index type 'this'.
Supporting Information
Please provide other information which led to this error, and any specific questions you have about it:
Sample code that causes this: