Skip to content

Optional parameter detection is overbroad #284

Closed

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.

Activity

  1. added 2 commits that reference this issue on Nov 7, 2018
    5feacf9
    9f9b015
  2. added a commit that references this issue on Nov 7, 2018
    cdf5a53
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions