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

Type signatures for TypeScript projects #72

Closed
disambiguator opened this issue Dec 6, 2020 · 1 comment
Closed

Type signatures for TypeScript projects #72

disambiguator opened this issue Dec 6, 2020 · 1 comment

Comments

@disambiguator
Copy link

Any thoughts on publishing type signatures for this project? I've worked around this locally by doing...

lib/types.ts

import * as p5 from 'p5';
import { ComponentType } from 'react';

export type P5WrapperComponent = ComponentType<{ sketch: (p: p5) => void }>;

index.d.ts

declare module 'react-p5-wrapper' {
  import { P5WrapperComponent } from './lib/types';
  export default P5WrapperComponent;
}
@jamesrweb jamesrweb linked a pull request Dec 6, 2020 that will close this issue
@jamesrweb jamesrweb self-assigned this Dec 6, 2020
@jamesrweb
Copy link
Collaborator

This will be done in the future when #65 is implemented but this will take some time as the process for v3 has just began.

Closing issue for now since to implement this today isn't as easy as you'd think with the current setup but will be in v3 as I said.

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

Successfully merging a pull request may close this issue.

2 participants