VA
HomePostsTagsAboutUsesContact
  1. Home
  2. /Posts
  3. /How to return tuple in typescript

How to return tuple in typescript

Tuesday 02/08/2022

·1 min read
JavaScript
Share:

We can do something like this:

return [variable1, variable2, variable3, variable4] as const
Share:
VA

Vadim Alakhverdov

Software developer writing about JavaScript, web development, and developer tools.

GitHubXLinkedIn

Related Posts

When Your AI Feature Gets Gamed: Prompt Injection Defense for JavaScript Apps

Practical prompt injection defense for JavaScript web apps: input sanitization middleware, system prompt hardening, canary tokens, and output validation with a real attack test suite.

How to Write an AI Feature Spec That Engineers Won't Push Back On

An AI feature spec template with the eight sections engineers actually want: success metrics, fallback behavior, latency budgets, edge cases, and eval sets. Real before/after example.

Build a Voice-Enabled AI Assistant in the Browser with TypeScript

Build a voice AI assistant in the browser with TypeScript using the Web Speech API, an LLM, and speech synthesis. Handle interruption, wake words, and mobile quirks — no backend needed for speech.

← Previous

Simple object validation

Next →

Access to element with ID

Get new posts in your inbox

© 2026 Vadim Alakhverdov

GitHubXRSSPrivacy