Skip to content

Conversation

@dawsonc623
Copy link
Contributor

@dawsonc623 dawsonc623 commented Oct 20, 2019

Description

Changed IterableIterator<any> to Iterator<any, any, any> to address an invalid compilation issues.

Related Issue

#28 shows a case where compilation fails.

Motivation and Context

The code prior to this change would not compile in some valid cases. This change seems to allow compilation is all valid cases.

How Has This Been Tested?

I ran the new code against a failing case, and it compiles fine now.


Closes #28

@dawsonc623
Copy link
Contributor Author

For some reason, I was unable to get the compilation failure to occur in the unit tests. The offending line of code in the issue seems to compile fine in the unit tests.

@n1ru4l
Copy link
Owner

n1ru4l commented Oct 20, 2019

@dawsonc623 could you please share your typescript version and settings?

@dawsonc623
Copy link
Contributor Author

TypeScript version: 3.6.3

tsconfig.json (I assume this is what you mean by settings)

{
  "compilerOptions": {
    "downlevelIteration": true,
    "esModuleInterop": true,
    "jsx": "react",
    "noImplicitReturns": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "strict": true
  },
  "include": [
    "./src/**/*.ts",
    "./src/**/*.tsx"
  ]
}

@n1ru4l n1ru4l merged commit df97e72 into n1ru4l:master Oct 20, 2019
@n1ru4l
Copy link
Owner

n1ru4l commented Oct 20, 2019

🎉 This PR is included in version 1.1.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dawsonc623 dawsonc623 deleted the pr/fix-iterator-type branch October 20, 2019 13:25
@n1ru4l n1ru4l mentioned this pull request Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Type '[] | [undefined]' is not assignable to type '[] | [string]'

2 participants