File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -2,10 +2,9 @@ declare const System: any;
22
33// example external ES Module declaration
44declare module 'example-module' {
5-
65 // public variables
76 export const exampleVariable : number ;
8-
7+
98 // public functions
109 export function exampleFunction ( param : string ) : boolean ;
1110
@@ -26,7 +25,7 @@ declare module 'example-react-module' {
2625 age : number ;
2726 }
2827 export class ReactComponent extends React . Component < ReactComponentProps , any > {
29- static somePrototypeMethod ( param : string ) : boolean ;
28+ static somePrototypeMethod ( param : string ) : boolean ;
3029 }
3130
3231 // public functions
Original file line number Diff line number Diff line change 1- // here you can customize hot-module-reload hook
2- // you could also copy to other modules
3- export function __reload ( prev ) {
4- if ( prev . app . state )
5- app . setState ( prev . app . state ) ;
6- }
7-
81// auto create app container if missing
92let appContainer = document . getElementById ( 'app-container' ) ;
103if ( appContainer == null ) {
@@ -17,9 +10,16 @@ if (appContainer == null) {
1710import * as React from 'react' ;
1811import * as ReactDOM from 'react-dom' ;
1912// components imports
20- import { Main } from './components/main' ;
21- import { AppStore , UserData } from './stores/app-store' ;
13+ import { Main } from './components/main' ;
14+ import { AppStore , UserData } from './stores/app-store' ;
2215
2316const message = 'React / TypeScript / JSPM - Starter-Kit' ;
2417const appStore = new AppStore ( new UserData ( 'Piotr' , 32 ) ) ;
2518export var app : any = ReactDOM . render ( < Main welcomeMessage = { message } appStore = { appStore } /> , appContainer ) ;
19+
20+ // here you can customize hot-module-reload hook
21+ // you could also copy to other modules
22+ export function __reload ( prev ) {
23+ if ( prev . app . state )
24+ app . setState ( prev . app . state ) ;
25+ }
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import './main.css!';
33// lib imports
44import * as React from 'react' ;
55// components imports
6- import { AppStore , UserData } from '../stores/app-store' ;
6+ import { AppStore } from '../stores/app-store' ;
77import { UserProfile } from './user-profile' ;
88
99interface LocalProps extends React . Props < Main > {
You can’t perform that action at this time.
0 commit comments