( ctx: StateContext, path: babel.NodePath<t.FunctionDeclaration | ValidFunction>, )
| 64 | } |
| 65 | |
| 66 | function isFunctionDirectiveValid( |
| 67 | ctx: StateContext, |
| 68 | path: babel.NodePath<t.FunctionDeclaration | ValidFunction>, |
| 69 | ) { |
| 70 | const body = path.get("body"); |
| 71 | |
| 72 | if (isPathValid(body, t.isBlockStatement)) { |
| 73 | return isDirectiveValid(ctx, body.node.directives); |
| 74 | } |
| 75 | |
| 76 | return false; |
| 77 | } |
| 78 | |
| 79 | function createID(ctx: StateContext, name: string) { |
| 80 | const base = `${ctx.hash}-${ctx.count++}`; |
no test coverage detected