TSConfig
allowUnusedLabels
When:
undefined
(default) provide suggestions as warnings to editorstrue
unused labels are ignoredfalse
raises compiler errors about unused labels
Labels are very rare in JavaScript and typically indicate an attempt to write an object literal:
tsTry
functionverifyAge (age : number) {// Forgot 'return' statementif (age > 18) {Unused label.7028Unused label.verified : true;}}