website updates for TS

Summary: update website to use TS instead of JS

Reviewed By: passy

Differential Revision: D16986666

fbshipit-source-id: 969de3ffcdf4aa594d9811947e5b440e594838e7
This commit is contained in:
Daniel Büchele
2019-08-24 03:27:00 -07:00
committed by Facebook Github Bot
parent f69bfab0f4
commit 378638a451
6 changed files with 26 additions and 22 deletions

View File

@@ -47,13 +47,16 @@ you can also specify a title to show in the Flipper sidebar and an icon to displ
{
"name": "sea-mammals",
"version": "1.0.0",
"main": "index.js",
"main": "index.tsx",
"license": "MIT",
"icon": "apps",
"title": "Sea Mammals"
"title": "Sea Mammals",
"dependencies": {
"flipper": "latest"
}
}
```
*See [package.json](https://github.com/facebook/flipper/blob/7dae5771d96ea76b75796d3b3a2c78746e581e3f/src/plugins/seamammals/package.json)*
*See [package.json](https://github.com/facebook/flipper/blob/master/src/plugins/seamammals/package.json)*
## Building a Table
@@ -171,7 +174,7 @@ Now that we've build all the individual pieces, we
just need to hook it all up using `createTablePlugin`:
```javascript
export default createTablePlugin({
export default createTablePlugin<Row>({
method: 'newRow',
columns,
columnSizes,
@@ -179,7 +182,7 @@ export default createTablePlugin({
buildRow,
});
```
*See [index.js](https://github.com/facebook/flipper/blob/7dae5771d96ea76b75796d3b3a2c78746e581e3f/src/plugins/seamammals/index.js)*
*See [index.tsx](https://github.com/facebook/flipper/blob/master/src/plugins/seamammals/index.tsx)*
The `method` we define here corresponds to the name
of the function we call on the native side to inform