SvelteKit adapter that automatically detects deployment environment and installs appropriate platform-specific adapter
Overall
score
96%
A TypeScript utility that validates SvelteKit adapter configurations at compile-time and runtime.
Create a type-safe validation utility for SvelteKit adapter configurations. The utility should leverage TypeScript type definitions to ensure adapters conform to the expected interface before being used in a SvelteKit project.
@generates
import type { Adapter } from '@sveltejs/kit';
/**
* Validates whether an object conforms to the SvelteKit Adapter interface.
*
* @param adapter - The adapter object to validate
* @returns true if the adapter has all required properties with correct types
*/
export function isValidAdapter(adapter: unknown): adapter is Adapter;
/**
* Type guard that checks if an adapter supports a specific feature.
*
* @param adapter - The adapter to check
* @param feature - The feature name to check support for
* @returns true if the adapter supports the feature
*/
export function supportsFeature(adapter: Adapter, feature: string): boolean;Provides TypeScript type definitions for SvelteKit adapters.
Install with Tessl CLI
npx tessl i tessl/npm-sveltejs--adapter-autodocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10