-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add support for TypeScript #43
Comments
hey @matteoturini thanks for the suggestion, I have no problems accepting a PR with typings for this library and would welcome anybody to add support for this it is not something I had planned originally, and I do not need it, so I'll leave it open for whoever wants to do it |
btw, IDE's like VSCode can highly profit from typescript typings too. |
You can use following typescript definition:
declare module "react-jutsu" {
import React, { ReactNode, ReactElement } from "react";
export interface JutsuProps extends React.HTMLProps<HTMLDivElement> {
// The meeting room name
roomName: string;
// The participant's displayed name
displayName?: string;
// The meeting room password
password?: string;
// Callback function executed after readyToClose event is fired
onMeetingEnd?: () => void;
// The meeting subject (what is displayed at the top)
subject?: string;
// Custom jitsi domain
domain?: string;
// component displayed while loading
loadingComponent?: JSX.Element;
// component displayed on error
errorComponent?: JSX.Element;
// Internally Jutsu is constructed inside 2 containers, you can add custom styles for each by specifying containerStyles and jitsiContainerstyles
containerStyles?: CSSProperties;
jitsiContainerStyles?: CSSProperties;
// Configuration object to overwrite. Visit https://github.com/jitsi/jitsi-meet/blob/master/config.js
configOverwrite?: any;
// Interface configuration object to overwrite. Visit https://github.com/jitsi/jitsi-meet/blob/master/interface_config.js
interfaceConfigOverwrite?: any;
// Callback function to be called with an error as the only parameter if any.
onError?: () => void;
// Callback function to be called with the jitsi API client when instantiated.
onJitsi?: () => void;
// Any other prop passed to the component will be passed to jitsi API constructor as part of the options parameter.
jwt?: any;
devices?: any;
userInfo?: any;
}
export const Jutsu: (props: JutsuProps) => ReactElement;
} |
mind pushing this into the repo? |
Include support for typescript typing definitions #43
Just published v3.0.3 with these typing definitions |
thank you @yyynnn, it seems like it's missing a step in the rollup configuration to include that in the build, I'm accepting PRs if anyone is willing to take a shot at this, otherwise I can work on it when I have some time. |
Typings serve for the TypeScript compiler to do type validations. Is it possible to make a typing for this library? Thanks.
The text was updated successfully, but these errors were encountered: