diff --git a/package.json b/package.json index df64104..31cbe28 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webcomponents-in-react", - "version": "1.0.1", + "version": "1.0.2", "description": "Use web components in React as if they were regular React components. Zero dependencies adapter.", "main": "dist/index.js", "module": "dist/index.esm.js", diff --git a/rollup.config.js b/rollup.config.js index 9da046c..1d50015 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,7 +2,7 @@ import typescript from "rollup-plugin-typescript2"; import pkg from "./package.json"; export default { - input: "src/index.tsx", + input: "src/index.ts", output: [ { file: pkg.main, diff --git a/src/index.tsx b/src/index.ts similarity index 96% rename from src/index.tsx rename to src/index.ts index a57c23e..bc01a97 100644 --- a/src/index.tsx +++ b/src/index.ts @@ -9,11 +9,11 @@ import { import { OverrideProps, EventListenerMap } from "./interfaces"; import { DEFAULT_EVENT_PREFIX } from "./constants"; -export const adapt = ( +export const adapt = ( componentSelector: string, overrideProps?: OverrideProps ) => { - return (props: any) => { + return (props: T & EventListenerMap) => { const webComponentRef = useRef(null); useEffect(() => {