Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unique symbol type for Cmd.getState, Cmd.dispatch #217

Merged
merged 1 commit into from
Aug 17, 2019

Conversation

laszlopandy
Copy link
Contributor

Typescript 2.7 added unique symbol to describe symbol types which are unique. Otherwise the types of Cmd.getState and Cmd.dispatch are assignable to each other.

Typescript 2.7 added `unique symbol` to describe symbol types which are unique. Otherwise the types of Cmd.getState and Cmd.dispatch are assignable to each other.
@bdwain
Copy link
Member

bdwain commented May 20, 2019

Is this backwards compatible? Does this raise the minimum typescript version? Or are 2.7 features already being used?

@laszlopandy
Copy link
Contributor Author

These are good questions.
No unique symbol is not backwards compatible. It will cause an syntax exception for anyone using an earlier version of typescript.

I'm not sure if any other syntax being used requires >=2.7. The only way to ensure that would be to downgrade the typescript version in package.json and run the tests. Therefore, I assumed that the minimum version is what is specified in the package.json (typescript 3.2.2). Is a minimum version specified somewhere else?

@laszlopandy
Copy link
Contributor Author

If it is important to maintain backwards compatibility, it is possible to specify multiple index.d.ts files which will be used by different versions of the typescript compiler:
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-1.html#version-selection-with-typesversions

@laszlopandy
Copy link
Contributor Author

@bdwain I tested a range of typescript versions and it seems that redux is already using syntax that requires >=2.8. So it is safe to say that unique symbol does not raise the minimum typescript version for redux-loop.

@bdwain
Copy link
Member

bdwain commented Aug 17, 2019

@laszlopandy great sorry for the delay thanks for looking into that

@bdwain bdwain merged commit 6fd0477 into redux-loop:master Aug 17, 2019
@laszlopandy laszlopandy deleted the patch-1 branch February 11, 2020 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants