Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 4c6e429

Browse files
committed
use ES6 style modules
1 parent 611462a commit 4c6e429

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

jsx/src/app.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React = require('react');
2-
import $ = require('jquery');
1+
import * as React from 'react';
2+
import * as $ from 'jquery';
33
import {Greeter as Greetifier, GreeterProps as GreeterProps} from 'greeter';
44

55
function getRandomGreeting() {

jsx/src/greeter.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React = require('react');
1+
import * as React from 'react';
22

33
export interface GreeterProps extends React.Props<Greeter> {
44
whomToGreet: string;
@@ -10,9 +10,11 @@ export class Greeter extends React.Component<GreeterProps, {}> {
1010
let g = this.props.greeting;
1111

1212
let greeting = 'Hello';
13+
1314
if (typeof g === 'string') {
1415
greeting = g;
15-
} else if (g) {
16+
}
17+
else if (g) {
1618
greeting = g();
1719
}
1820

0 commit comments

Comments
 (0)