12 ms·
I agree that the writer shouldn't have used TypeScript to demonstrate JavaScript; but to be fair, the only thing you have to do to turn it into JS is remove the
by cprecioso 8y ago
I agree that the writer shouldn't have used TypeScript to demonstrate JavaScript; but to be fair, the only thing you have to do to turn it into JS is remove the `as ConsignmentSetup` on the 4th line.
- rootlocus 8y ago> the only thing you have to do to turn it into JS is remove the `as ConsignmentSetup` Removing the cast means removing static typing. It might be a small change for this snippet, but at the project level, you'd need considerably more changes, and you'd lose type safety.