Skip to content

Unexplained change to decode return type causing 1.0 migration difficulty #216

@benmccann

Description

@benmccann

Pre-1.0 we had:

decode?(value: string): string;

Now we have:

decode?: (str: string) => string | undefined;

This is blocking us from upgrading because it means we would potentially be passing undefined values to our users where we weren't before. It's very unclear to me under what circumstances this method would ever return an undefined value and what the motivation for this change was. Was this change in type signature a mistake that can be reverted? Or can we explain in the JSDoc and changelog when an undefined should be returned?

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