All your examples use
import ts = require('typescript')
// ...
ts.createExportAssignment(/* ... */):
(e.g example Import Macro)
This generates warnings
'createExportAssignment' is deprecated.
@deprecated — Use factory.createExportAssignment or the factory supplied by your transformation context instead.