Skip to content

Inheritance functionality #3

@bkd705

Description

@bkd705

Another good feature that would be cool to implement would be some sort of inheritance functionality.

Say you have Post like,

Factory.register('Post', () => ({
     id: 'random string',
     created_by: 'random string',
     title: 'random string',
     body: 'random string'
}))

and you wanted to have another type of post that has tags, or comments

Factory.register('PostWithTags', () => ({
     id: 'random string',
     created_by: 'random string',
     title: 'random string',
     body: 'random string',
     tags: [ 'random string' ]
}))

well what if you could do something like

Factory.register('PostWithTags', () => ({
     extends: 'Post',
     tags: [ 'random string' ]
}))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions