Skip to content

Another solution for Q14: declare precise value in interface #72

@zmzlois

Description

@zmzlois

.....

interface User {
  id: string;
  firstName: string;
  lastName: string;
}

interface Post {
  id: User["id"];
  title: string;
  body: string;
}

interface Comment {
  id: User["id"];
  comment: string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions