Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>SvelteKit SnippetsNew to Visual Studio Code? Get it now.

SvelteKit Snippets

MrAmericanMike

|
69 installs
| (0) | Free
SvelteKit Snippets
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SvelteKit Snippets

This Extension adds snippets for SvelteKit.

Features

Snippets for javascript and typescript.

Example:

$import will expand to:

import {} from "@sveltejs/kit";

$get in Javascript will expand to:

/** @type {import("./$types").RequestHandler} */
export function GET(event) {
	return json({});
}

$get in Typescript will expand to:

export const GET = ((event) => {
	return json({});
}) satisfies RequestHandler;

$pagedata in Javascript will expand to:

/** @type {import("./$types").PageData} */
export let data;

$pagedata in Typescript will expand to:

import type { PageData } from \"./$types\";
export let data: PageData;

Many other snippets like:

$import, $get, $post, $patch, $put, $delete, $pagedata, $layoutdata, $environment, $forms, $navigation, $paths, $stores, $envstaticpublic, $envstaticprivate, $envdynamicpublic, $envdynamicprivate, $serviceworker, $hooks, $node, $polyfills, $vite, $lib, $internal

Release Notes

0.0.3

Fixed minor error on documentation Added Issues Tracker to the documentation Added basic support for TypeScript

0.0.2

Better documentation on README.md

0.0.1

Initial release of Svelte Snippets by MrAmericanMike


Requests - Ideas

Do you have a request or idea for the extension. Please post it on our Discussion Board on GitHub

Issues

Please report any issues on GitHub Issues Tracker


Pending features

Determine if it's possible for a snippets extension to have a configuration option and use it so the final user can decide if they want single or double quotes


  • Contact us
  • Jobs
  • Privacy
  • Terms of use
  • Trademarks
© 2023 Microsoft