Editor & IDE Integration
Valype provides rich IDE support for .valype.ts files via:
🥇 VSCode Extension (Recommended)
You can get instant type hints, code completion, and go-to-definition for .valype.ts files by installing the Valype VSCode extension.
- No manual tsconfig plugin configuration required
- Works out of the box for all
.valype.tsfiles
Just search for "Valype" in the VSCode Extensions Marketplace and install.
The extension is also available on openVSX for use in editors like Cursor.
🛠️ TypeScript Plugin (Advanced/Custom)
TypeScript language service plugin that provides IDE support for .valype.ts files.
Features
- Recognizes
.valype.tsfile extension - Transforms valype code to TypeScript in real-time
- Provides IDE features like type checking, code completion and go-to-definition
- Supports validation, semantic analysis and formatting
Installation
bash
npm install -D @valype/typescript-pluginbash
yarn add -D @valype/typescript-pluginbash
pnpm add -D @valype/typescript-pluginbash
bun add -D @valype/typescript-pluginUsage
- Configure plugin in tsconfig.json:
json
{
"compilerOptions": {
"plugins": [
{
"name": "@valype/typescript-plugin"
}
]
}
}Create
.valype.tsfiles and start writing valype codeFor VSCode users, ensure you're using the workspace version of TypeScript:
- Open a TypeScript file in VSCode
- Click the TypeScript version number in the status bar
- Select "Use Workspace Version" from the dropdown
Example
typescript
// user.valype.ts
interface User {
name: string
age: number
}typescript
// use user.valype.ts
import { validateUser, assertUser, isUser, type User } from './user.valype'
const data = {} satisfies User
const result = validateUser(data)
if (isUser(data)) console.log('data is User')
assertUser(data)