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

Function isValidDirective

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected