Blog Logo
  • boneskull dot com
Menu
  • boneskull dot com

How to Abuse TypeScript Definitions for Better Code Assistance in JavaScript Projects

by Christopher Hiller

So there I was, writing a CLI tool in plain old JavaScript. I had pulled in yargs, as I often do.

Here's the source of my executable:

screenshot

I'm looking at the above and wondering why demandCommand is highlighted as an instance member function, but usage, command, help etc. are not.

(continue reading)

jetbrains, typescript, node.js
Sep 07, 2017

About

"boneskull" is the alias of Christopher Hiller. This is his blog. Maintainer of Mocha, a JS testing framework. Dev Advocate in Node.js @ IBM. Shenanigans & opinions his own. Also a lizard person.

Tags

  • ai
  • arduino
  • ci
  • cli
  • esp32
  • esp8266
  • ghost
  • javascript
  • jetbrains
  • macos
  • meta
  • micropython
  • mocha
  • mqtt
  • node.js
  • npm
  • openwhisk
  • python
  • raspberry-pi
  • rimraf
  • rollup
  • sensor
  • serverless
  • testing
  • travis-ci
  • tutorial
  • typescript
  • vscode
  • watson
  • web
  • webstorm
  • yeoman

Recent Posts

  • Recursive Directory Removal in Node.js
  • Mocha v6 adds Configuration File Support & Drops Node.js v4.x
  • create-yo: Use any Yeoman generator. Don't install stuff.
Page 1 of 1

© 2017-2018 Christopher Hiller. Some rights reserved.

boneskull.com is licensed under a Creative Commons Attribution 4.0 International License .