Skip to content

Optional parameter detection is overbroad #284

@dstufft

Description

@dstufft

Opening this as @eladb has suggested it is a bug.

Currently the any type is being detected as optional, so a method signature like foo(myArg: any, otherArg: boolean) is detecting that myArg is optional. This (might?) extend to function signatures like foo(myArg?: boolean, otherArg: boolean).

Generally some languages (Python, .NET) can't support a mandatory parameter after an optional parameter has been emitted. So we need to make sure that:

(1) We're not erroneously detecting the any type as optional.
(2) We're not emitting mandatory parameters after optional parameters.

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