Skip to content

Upgrade TypeScript to 2.9 #98

Closed
Closed
@webmaster128

Description

@webmaster128

With TypeScript 2.9, our code does not compile anymore. The problematic piece is

  constructor(data?: KeyDataString) {
    const identities: PublicIdentity[] = [];
    const privkeys = new Map<string, Ed25519Keypair>();
    if (data) { // data is always of type undefined
      const decodedData = JSON.parse(data); // data is always of type undefined

Both constructor(data?: KeyDataString) and constructor(data: KeyDataString | undefined) do not work anymore, while constructor(data?: string) and constructor(data: string | undefined) are not problem.

I guess this is a bug in Typescript, so the next steps would be to write a minimal example and file a bugreport.

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