You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be awesome to be able to use this module in my React Typescript application. In order to do this we need to add type definitions to the /dist directory. I believe this will also clear up the prior issue opened on this repository: #22.
I tried to submit a PR but was denied permission. Only three things need to happen for this to work.
1.) Adding this line to the package.json file: "types": "dist/index.d.ts"
2.) Adding this code to /src/index.ts
import * as React from 'react'
import * as moment from 'moment'
// Interfaces
interface ReactAddToCalendarProps {
event: CalendarEventInterface
}
export interface CalendarEventInterface {
title: string
description: string
location: string
startTime: moment.Moment
endTime: moment.Moment
}
// Declare the Module with accepted props.
declare class ReactAddToCalendar extends React.Component<ReactAddToCalendarProps, any> { }
export default ReactAddToCalendar
3.) Having the build command copy the src/index.d.ts file to the dist folder.
It would be awesome to be able to use this module in my React Typescript application. In order to do this we need to add type definitions to the /dist directory. I believe this will also clear up the prior issue opened on this repository: #22.
I tried to submit a PR but was denied permission. Only three things need to happen for this to work.
1.) Adding this line to the package.json file: "types": "dist/index.d.ts"
2.) Adding this code to /src/index.ts
3.) Having the build command copy the src/index.d.ts file to the dist folder.
Please let me know if we can make this happen!
Thanks,
Sam Gruse
[email protected]
The text was updated successfully, but these errors were encountered: