Skip to content

Same type referenced multiple times in param doesnt throw error #33299

@pdeva

Description

@pdeva

TypeScript Version: 3.6.2

Search Terms:

Code

type A = {first: string};
type B = {second: string};


function test(props: A&B &A) {
}

Expected behavior:

Should throw error cause A is used multiple times in type definition of props

Actual behavior:
No error is thrown

Playground Link:

http://www.typescriptlang.org/play/#code/C4TwDgpgBAglC8UDeAzAlgJwM7AFxRwzQDsBzAXwG4AoUSKAIQWSwgGMB7YgE30JIo1q1FAFdibYGi5RgEHAAowGDmCz4YAMiaaYASmTDyQA

Related Issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions