MCPcopy
hub / github.com/mobxjs/mobx / expect

Function expect

docs/assets/getting-started-assets/javascripts/JSXTransformer.js:5682–5687  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

5680 // If not, an exception will be thrown.
5681
5682 function expect(value) {
5683 var token = lex()
5684 if (token.type !== Token.Punctuator || token.value !== value) {
5685 throwUnexpected(token)
5686 }
5687 }
5688
5689 // Expect the next token to match the specified keyword.
5690 // If not, an exception will be thrown.

Callers 15

parseArrayInitialiserFunction · 0.70
parseObjectPropertyKeyFunction · 0.70
parseObjectPropertyFunction · 0.70
parseObjectInitialiserFunction · 0.70
parseGroupExpressionFunction · 0.70
parseArgumentsFunction · 0.70
parseNonComputedMemberFunction · 0.70
parseComputedMemberFunction · 0.70
parseBlockFunction · 0.70

Calls 2

lexFunction · 0.85
throwUnexpectedFunction · 0.85

Tested by 15

runTestSuiteFunction · 0.40
tryLogoutFunction · 0.40
ContextConsumerFunction · 0.40
testComponentFunction · 0.40
doTestFunction · 0.40
constructorMethod · 0.40
tryLogoutFunction · 0.40
renderMethod · 0.40
typeCheckFailFunction · 0.40
typeCheckPassFunction · 0.40
renderMethod · 0.40