Skip to content

fix: not working function dependency injection examples from docs #813

Open
@sergiycheck

Description

@sergiycheck

Description

I'm reading docs here github docs and I find that function dependency
injection examples does not work and Service decorator does not accept function arg.

Minimal code-snippet showcasing the problem

export const PostRepository = Service(() => ({
  getName() {
    return 'hello from post repository';
  },
}));

Expected behavior

Actual behavior

image

typedi version

{
 "typedi": "^0.10.0"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs triageIssues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions