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

Statements are not allowed in ambient contexts #165

Closed
SDSLeon opened this issue Apr 16, 2018 · 8 comments
Closed

Statements are not allowed in ambient contexts #165

SDSLeon opened this issue Apr 16, 2018 · 8 comments
Assignees
Labels

Comments

@SDSLeon
Copy link

SDSLeon commented Apr 16, 2018

image

Typescript version 2.8.1
toastify version 4.0.0-rc2

fkhadra added a commit that referenced this issue Apr 16, 2018
@fkhadra fkhadra self-assigned this Apr 16, 2018
@fkhadra fkhadra added the bug label Apr 16, 2018
@fkhadra
Copy link
Owner

fkhadra commented Apr 16, 2018

@SDSLeon I published the fix. Is there any way to test a definition file with typescript ?

@SDSLeon
Copy link
Author

SDSLeon commented Apr 16, 2018

@fkhadra

import { Slide, Zoom, Flip, Bounce } from 'react-toastify';

also should be added to index.d.ts;

image

@fkhadra
Copy link
Owner

fkhadra commented Apr 16, 2018

@SDSLeon thanks a lot:

Is that ok if I do the following for each component:

export Class Slide extends Components<any, any>{}

I'm a typescript noob btw

@SDSLeon
Copy link
Author

SDSLeon commented Apr 16, 2018

@fkhadra

also transition param in CommonOptions should be
transition?: React.ComponentType;

right now it not accept custom animation defined like this
image

and then
export class Slide extends React.Component {}
or
export const Slide: React.ComponentType;

@SDSLeon
Copy link
Author

SDSLeon commented Apr 16, 2018

example of transition param type missmatch
image

Thanks for awesome package!

@fkhadra
Copy link
Owner

fkhadra commented Apr 16, 2018

@SDSLeon thanks a lot for your help, I appreciate.

I published the fix, I hope this time it's ok 😀

@SDSLeon
Copy link
Author

SDSLeon commented Apr 16, 2018

@fkhadra excellent. For me all works as expected right now.

@fkhadra
Copy link
Owner

fkhadra commented Apr 16, 2018

Thanks again

@fkhadra fkhadra closed this as completed Apr 16, 2018
vasiliydolmatov pushed a commit to vasiliydolmatov/react-toastify that referenced this issue Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants