Skip to content

Options.ignore changed type from 8.0.1 to 8.0.2 #1063

Description

@simhnna

Previously (ts-node 7.x.x) options.ignore used to be a string | string[] and it continued to be supported in 8.0.0.

However in 8.0.2 it was changed to only accept string

The breaking change is this commit 0db041f

The current types only allow an array, but the docs say that the default is a string

https://github.com/TypeStrong/ts-node/blob/master/src/index.ts#L171

Can we bring back string | string[]?

Activity

  1. cspotcode commented on Jun 2, 2020

    @cspotcode
    Collaborator
  2. blakeembrey commented on Jun 2, 2020

    @blakeembrey
    Member

    The commit you pointed out doesn’t change the input type of the option. Also, as far as I can see in both that commit and master, it accepts only an array of strings.

  3. blakeembrey commented on Jun 2, 2020

    @blakeembrey
    Member

    To clarify, the contract this module follows is what is documented (usually in the type system). In this case the breaking change was an undocumented use case that wouldn’t compile in typescript. Happy to update the README to match correctly, but I don’t see where it says it accepts a string there.

  4. cspotcode commented on Jun 14, 2021

    @cspotcode
    Collaborator

    Closing because relevant docs improvements are covered by #1089.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions