MCPcopy Create free account
hub / github.com/babel/babel / isValidDirective

Function isValidDirective

packages/babel-parser/src/parser/statement.ts:1252–1258  ·  view source on GitHub ↗
(stmt: N.Statement)

Source from the content-addressed store, hash-verified

1250 }
1251
1252 isValidDirective(stmt: N.Statement): stmt is N.ExpressionStatement {
1253 return (
1254 stmt.type === "ExpressionStatement" &&
1255 stmt.expression.type === "StringLiteral" &&
1256 !stmt.expression.extra!.parenthesized
1257 );
1258 }
1259
1260 parseBlockBody(
1261 this: Parser,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected