* Copies any necessary standard and custom prologue-directives into target array. * @param source origin statements array * @param target result statements array * @param ensureUseStrict boolean determining whether the function need to add prologue-directives * @p
(source, target, ensureUseStrict, visitor)
| 26997 | * @param visitor Optional callback used to visit any custom prologue directives. |
| 26998 | */ |
| 26999 | function copyPrologue(source, target, ensureUseStrict, visitor) { |
| 27000 | var offset = copyStandardPrologue(source, target, 0, ensureUseStrict); |
| 27001 | return copyCustomPrologue(source, target, offset, visitor); |
| 27002 | } |
| 27003 | function isUseStrictPrologue(node) { |
| 27004 | return ts.isStringLiteral(node.expression) && node.expression.text === "use strict"; |
| 27005 | } |
nothing calls this directly
no test coverage detected