TODO for TypeScript
Utility function to indicate unfinished code by throwing with a message of "Not yet implemented".
This can be useful if you are prototyping and are just looking to have your code typecheck.
The difference between
todo is that while
todo conveys an intent of implementing the functionality later and the message is "Not yet implemented",
unimplemented makes no such claims. Its message is "Not implemented".
Advantages over simply throwing an error:
- You can easily search your codebase for
- The error thrown will have the code
- Very clear what intentions it conveys
npm install --save ts-todo
// Here's an example of some in-progress code. We have a interface Foo:// We want to implement Foo on one of our types, but we also want to work on just bar() first.// In order for our code to compile, we need to implement baz(), so we can use todo: