2017-02-21 23:29:22 +01:00
|
|
|
|
// @filename: file.tsx
|
|
|
|
|
// @jsx: preserve
|
|
|
|
|
// @noLib: true
|
2017-10-04 23:43:35 +02:00
|
|
|
|
// @skipLibCheck: true
|
2017-02-21 23:29:22 +01:00
|
|
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
|
|
|
|
|
|
import React = require('react');
|
|
|
|
|
|
|
|
|
|
interface Address {
|
|
|
|
|
street: string;
|
|
|
|
|
country: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface CanadianAddress extends Address {
|
|
|
|
|
postalCode: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface AmericanAddress extends Address {
|
|
|
|
|
zipCode: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Properties = CanadianAddress | AmericanAddress;
|
|
|
|
|
|
|
|
|
|
export class AddressComp extends React.Component<Properties, void> {
|
|
|
|
|
public render() {
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let a = <AddressComp postalCode='T1B 0L3' street="vancouver" country="CA" />
|