Skip to content

一个接口中只能定义一个任意属性这里的age不能是可选的 #225

Description

@mengliren666

//这里的age不能是可选的,因为propName: string
interface Person {
name: string;
age?: number;
[propName: string]: string | number;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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