Skip to content

Commit

Permalink
fix types for xarc/react
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Feb 3, 2021
1 parent daae024 commit 4cc5c15
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions packages/xarc-create-app/template/src/import-assets.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// custom typing for import assets
declare module "*.png" {
const value: any;
export default value;
}
1 change: 1 addition & 0 deletions packages/xarc-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"author": "Electrode",
"license": "Apache-2.0",
"dependencies": {
"@types/react": ">= 16",
"@xarc/render-context": "^1.0.3",
"@xarc/subapp": "^0.1.4",
"@xarc/tag-renderer": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/xarc-react/src/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDom from "react-dom";
import ReactDomServer from "react-dom/server";
import { SubAppOptions, SubApp, SubAppFeatureFactory, SubAppDef } from "@xarc/subapp";

export type ReactSubApp = SubApp<React.Component>;
export type ReactSubApp = SubApp<React.Component | React.FunctionComponent>;

//
// re-exports
Expand Down
5 changes: 5 additions & 0 deletions samples/create-app-demo/src/import-assets.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// custom typing for import assets
declare module "*.png" {
const value: any;
export default value;
}

0 comments on commit 4cc5c15

Please sign in to comment.