mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
- use `export = var` syntax so it works as a global library - put interfaces in ghost module so they don't pollute global namespace - add JSDoc comments for each prop - move old version to -0.9.10
31 lines
654 B
TypeScript
31 lines
654 B
TypeScript
|
|
/// <reference path="../react/react.d.ts" />
|
|
/// <reference path="../react/react-dom.d.ts" />
|
|
/// <reference path="./react-select.d.ts" />
|
|
|
|
import * as React from "react"
|
|
import * as ReactDOM from "react-dom"
|
|
|
|
import * as Select from "react-select"
|
|
|
|
class SelectTest extends React.Component<React.Props<{}>, {}> {
|
|
|
|
render() {
|
|
const options: ReactSelect.Option[] = [{ label: "Foo", value: "bar" }]
|
|
return <div>
|
|
<Select options={options} />
|
|
</div>
|
|
}
|
|
|
|
}
|
|
|
|
class SelectAsyncTest extends React.Component<React.Props<{}>, {}> {
|
|
|
|
render() {
|
|
return <div>
|
|
<Select.Async />
|
|
</div>
|
|
}
|
|
|
|
}
|