MCPcopy Index your code
hub / github.com/nodejs/node / getStrictModeIdentifierMessage

Function getStrictModeIdentifierMessage

test/fixtures/snapshot/typescript.js:46574–46584  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

46572 }
46573 }
46574 function getStrictModeIdentifierMessage(node) {
46575 // Provide specialized messages to help the user understand why we think they're in
46576 // strict mode.
46577 if (ts.getContainingClass(node)) {
46578 return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode;
46579 }
46580 if (file.externalModuleIndicator) {
46581 return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode;
46582 }
46583 return ts.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode;
46584 }
46585 // The binder visits every node, so this is a good place to check for
46586 // the reserved private name (there is only one)
46587 function checkPrivateIdentifier(node) {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected