From eaa54b953bad547ca3fa84c6bd1f3fcf75667c84 Mon Sep 17 00:00:00 2001 From: swyx Date: Fri, 21 Aug 2020 01:26:58 +0800 Subject: [PATCH 1/3] add discord links --- README.md | 4 ++-- website/docusaurus.config.js | 11 +++++++++-- website/src/pages/index.js | 6 ++++++ 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index eaa5dd55..32d7a378 100644 --- a/README.md +++ b/README.md @@ -25,13 +25,13 @@
-:wave: This repo is maintained by [@swyx](https://twitter.com/swyx), [@ferdaber](https://twitter.com/ferdaber), [@eps1lon](https://twitter.com/sebsilbermann), [@IslamAttrash](https://twitter.com/IslamAttrash), [@jsjoeio](https://twitter.com/jsjoeio) and [@arvindcheenu](https://twitter.com/arvincheenu), we're so happy you want to try out TypeScript with React! If you see anything wrong or missing, please [file an issue](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/new/choose)! :+1: +:wave: This repo is maintained by [@swyx](https://twitter.com/swyx), [@ferdaber](https://twitter.com/ferdaber), [@eps1lon](https://twitter.com/sebsilbermann), [@jsjoeio](https://twitter.com/jsjoeio) and [@arvindcheenu](https://twitter.com/arvincheenu), we're so happy you want to try out TypeScript with React! If you see anything wrong or missing, please [file an issue](https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/issues/new/choose)! :+1:
--- -[![All Contributors](https://img.shields.io/github/contributors/typescript-cheatsheets/react-typescript-cheatsheet?color=orange&style=flat-square)](/CONTRIBUTORS.md) +[![All Contributors](https://img.shields.io/github/contributors/typescript-cheatsheets/react-typescript-cheatsheet?color=orange&style=flat-square)](/CONTRIBUTORS.md) | [![Discord](https://img.shields.io/discord/746055213462585435.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/y88evmj) ## All React + TypeScript Cheatsheets diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 5a17351c..daf93860 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -129,8 +129,15 @@ module.exports = { "https://github.com/typescript-cheatsheets/react-typescript-cheatsheet", }, { - html: - 'GitHub stars', + html: ` + GitHub stars + `, + }, + { + label: "Discord", + html: ` + + `, }, ], }, diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 0a7d82f0..252ae569 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -26,6 +26,12 @@ export default function Home() { > Getting started + + Join Official Discord + From 2184e323fba78d6a8068fc59dbc5dfc8772a6a35 Mon Sep 17 00:00:00 2001 From: swyx Date: Fri, 21 Aug 2020 01:52:38 +0800 Subject: [PATCH 2/3] add twitter --- README.md | 2 +- website/docusaurus.config.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 32d7a378..70800d68 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ --- -[![All Contributors](https://img.shields.io/github/contributors/typescript-cheatsheets/react-typescript-cheatsheet?color=orange&style=flat-square)](/CONTRIBUTORS.md) | [![Discord](https://img.shields.io/discord/746055213462585435.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/y88evmj) +[![All Contributors](https://img.shields.io/github/contributors/typescript-cheatsheets/react-typescript-cheatsheet?color=orange&style=flat-square)](/CONTRIBUTORS.md) | [![Discord](https://img.shields.io/discord/746055213462585435.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/y88evmj) | [![Tweet](https://img.shields.io/twitter/url?label=Help%20spread%20the%20word%21&style=social&url=https%3A%2F%2Fgithub.com%2Ftypescript-cheatsheets%2Freact)](http://twitter.com/home?status=Awesome%20%40Reactjs%20%2B%20%40TypeScript%20cheatsheet%20by%20%40ferdaber%2C%20%40sebsilbermann%2C%20%40swyx%20%26%20others!%20https%3A%2F%2Fgithub.com%2Ftypescript-cheatsheets%2Freact) ## All React + TypeScript Cheatsheets diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index daf93860..704b6a59 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -139,6 +139,12 @@ module.exports = { `, }, + { + label: "Spread the word", + html: ` + + `, + }, ], }, ], From b64da69cee662888b6a4bbc612d53a5b4586feb0 Mon Sep 17 00:00:00 2001 From: swyx Date: Sat, 22 Aug 2020 01:05:14 +0800 Subject: [PATCH 3/3] format --- docs/basic/troubleshooting/types.md | 6 +++--- docs/migration/from-js.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/basic/troubleshooting/types.md b/docs/basic/troubleshooting/types.md index 8077043b..a7182ce6 100644 --- a/docs/basic/troubleshooting/types.md +++ b/docs/basic/troubleshooting/types.md @@ -370,7 +370,7 @@ let baz2: SubIsntType2 = { ## The Types I need don't exist! -What's more annoying than modules with unexported types? Modules that are **untyped**! +What's more annoying than modules with unexported types? Modules that are **untyped**! > Before you proceed - make sure you have checked that types don't exist in [DefinitelyTyped](https://github.com/DefinitelyTyped/DefinitelyTyped) or [TypeSearch](https://microsoft.github.io/TypeSearch/) @@ -404,9 +404,9 @@ This solution works well as a workaround if you have less than a couple untyped ### Autogenerate types -You can use TypeScript with `--allowJs` and `--declaration` to see TypeScript's "best guess" at the types of the library. +You can use TypeScript with `--allowJs` and `--declaration` to see TypeScript's "best guess" at the types of the library. -If this doesn't work well enough, use [`dts-gen`](https://github.com/Microsoft/dts-gen) to use the runtime shape of the object to accurately enumerate all available properties. This tends to be very accurate, BUT the tool does not yet support scraping JSDoc comments to populate additional types. +If this doesn't work well enough, use [`dts-gen`](https://github.com/Microsoft/dts-gen) to use the runtime shape of the object to accurately enumerate all available properties. This tends to be very accurate, BUT the tool does not yet support scraping JSDoc comments to populate additional types. ```bash npm install -g dts-gen diff --git a/docs/migration/from-js.md b/docs/migration/from-js.md index c0f6e110..66ec7670 100644 --- a/docs/migration/from-js.md +++ b/docs/migration/from-js.md @@ -8,7 +8,7 @@ title: From JS - [TypeStat](https://github.com/JoshuaKGoldberg/TypeStat) ([used by Codecademy](https://mobile.twitter.com/JoshuaKGoldberg/status/1159090281314160640)) - [TypeWiz](https://github.com/urish/typewiz) - [js-to-ts-converter](https://github.com/gregjacobs/js-to-ts-converter) -- [TS-migrate](https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-migrating-to-typescript-at-scale-cd23bfeb5cc) from Airbnb +- [TS-migrate](https://medium.com/airbnb-engineering/ts-migrate-a-tool-for-migrating-to-typescript-at-scale-cd23bfeb5cc) from Airbnb - [dts-gen](https://github.com/microsoft/dts-gen) - `dts-gen` is a tool that generates TypeScript definition files (.d.ts) from any JavaScript object. ## Manual JS to TS Conversion