From df4ce63eb0abf931e4bfd9625df0281a3e792e83 Mon Sep 17 00:00:00 2001 From: spacejack Date: Thu, 21 Dec 2017 01:25:58 -0500 Subject: [PATCH] docs: Add Typescript install notes (#2057) --- docs/installation.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/installation.md b/docs/installation.md index 57efabe6..5c204e6a 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -2,6 +2,8 @@ - [CDN](#cdn) - [NPM](#npm) +- [Quick start with Webpack](#quick-start-with-webpack) +- [Typescript](#typescript) ### CDN @@ -15,8 +17,13 @@ If you're new to Javascript or just want a very simple setup to get your feet we ### NPM -#### Quick start with Webpack +```bash +$> npm install mithril --save +``` +--- + +### Quick start with Webpack 1. Initialize the directory as an npm package ```bash @@ -251,3 +258,15 @@ If you don't have the ability to run a bundler script due to company security po // if a CommonJS environment is not detected, Mithril will be created in the global scope m.render(document.body, "hello world") ``` + +--- + +### TypeScript + +TypeScript type definitions are available from DefinitelyTyped. They can be installed with: + +```bash +$> npm install @types/mithril --save-dev +``` + +For example usage, to file issues or to discuss TypeScript related topics visit: https://github.com/MithrilJS/mithril.d.ts