How to load a variable's file in serverless.ts

In serverless.yaml we can load a env.json variable in this way

functions:
hello:
handler: handler.hello
environment: ${file(env.json)}

how can we convert environment line on typescript

Thank you