Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Functions
  • Comparing with other Yandex Cloud services
    • All tutorials
      • Deploying a web application
      • Developing a custom integration
      • URL shortener
      • Building an interactive serverless application using WebSocket
      • Creating a Node.js function using TypeScript
      • Connecting to a YDB database from a Python function
      • Connecting to a YDB database from a function in Node.js
      • Canary release of a function in Cloud Functions
      • Interactive debugging of functions
  • Tools
  • Pricing policy
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ
  1. Tutorials
  2. Serverless-based backend
  3. Creating a Node.js function using TypeScript

Creating a Node.js function using TypeScript

Written by
vladd11
Updated at April 13, 2026

By default, Node.js does not support TypeScript. Before uploading TypeScript code to Cloud Functions, you need to compile it in JavaScript.

  1. Install Node.js.

  2. Open your project directory.

  3. Install TypeScript:

    npm install typescript --save-dev
    
  4. Create a TypeScript configuration:

    npx --no-install tsc --init --preserveConstEnums --moduleResolution Node --isolatedModules --outDir build --strict false --target ES2021
    

    To use a different version of JavaScript, change the value of the target argument. The latest JavaScript version that can be specified depends on the Node.js version you are using:

    Node.js version Highest JavaScript version
    12 ES2019
    14 ES2020
    16 ES2021
  5. Compile a function:

    npx tsc
    
  6. The build directory will appear in the project folder. Add its contents to a ZIP archive.

  7. Create a function.

  8. Create a function version.

Was the article helpful?

Previous
Building an interactive serverless application using WebSocket
Next
Connecting to a YDB database from a Python function
© 2026 Direct Cursus Technology L.L.C.