open-index/open-npm huggingface dataset:
npm package: @sveltejs/acorn-typescript
Description: Acorn plugin that parses TypeScript
Author: tyrealhu and the Svelte team
Latest version: 1.0.9

# @sveltejs/acorn-typescript

[![License](https://img.shields.io/npm/l/svelte.svg)](LICENSE.md) [![Chat](https://img.shields.io/discord/457912077277855764?label=chat&logo=discord)](https://svelte.dev/chat)

This is a plugin for [Acorn](http://marijnhaverbeke.nl/acorn/) - a tiny, fast JavaScript parser, written completely in JavaScript.

It was created as an experimental alternative, faster [TypeScript](https://www.typescriptlang.org/) parser. It will help you to parse
TypeScript using Acorn.

## Usage

To get started, import the plugin and use Acorn's extension mechanism to register it. You have to enable `options.locations` while using `@sveltejs/acorn-typescript`.

```typescript
import { Parser } from 'acorn';
import { tsPlugin } from '@sveltejs/acorn-typescript';

const node = Parser.extend(tsPlugin()).parse(
	`
const a = 1
type A = number
export {
  a,
  type A as B
}
`,
	{
		sourceType: 'module',
		ecmaVersion: 'latest',
		locations: true
	}
);
```

If you want to enable parsing within a TypeScript ambient context, where certain syntax have different rules (like `.d.ts` files and inside [declare module blocks](https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html)):

```typescript
import { Parser } from 'acorn';
import { tsPlugin } from '@sveltejs/acorn-typescript';

const node = Parser.extend(tsPlugin({ dts: true })).parse(
	`
const a = 1
type A = number
export {
  a,
  type A as B
}
`,
	{
		sourceType: 'module',
		ecmaVersion: 'latest',
		locations: true
	}
);
```

## SUPPORTED

- Typescript normal syntax
- Support to parse TypeScript [Decorators](https://www.typescriptlang.org/docs/handbook/decorators.html)
- Support to parse JSX & TSX

## CHANGELOG

[click](./CHANGELOG.md)

## Acknowledgments

We want to thank [TyrealHu](https://github.com/TyrealHu) for his original work on this project. He maintained [`acorn-typescript`](https://github.com/TyrealHu/acorn-typescript) until early 2024.
npm package: @sveltejs/adapter-auto
Description: Automatically chooses the SvelteKit adapter for your current environment, if possible.
Latest version: 7.0.1

# adapter-auto

Automatically chooses the SvelteKit adapter for your current environment, if possible.

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-auto)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-auto/CHANGELOG.md).
npm package: @sveltejs/adapter-begin
Description: `@sveltejs/adapter-begin` can now be found on Github at https://github.com/architect/sveltekit-adapter and on npm at https://www.npmjs.com/package/@architect/sveltekit-adapter.
Latest version: 1.0.0-next.15
Deprecated: @sveltejs/adapter-begin can now be found on GitHub at https://github.com/architect/sveltekit-adapter and on npm at https://www.npmjs.com/package/@architect/sveltekit-adapter
npm package: @sveltejs/adapter-cloudflare
Description: Adapts SvelteKit applications for Cloudflare Workers or Cloudflare Pages
Latest version: 7.2.8

# adapter-cloudflare

[Adapter](https://svelte.dev/docs/kit/building-your-app) for building SvelteKit applications on [Cloudflare Workers](https://developers.cloudflare.com/workers/) with [static assets](https://developers.cloudflare.com/workers/static-assets/) or [Cloudflare Pages](https://developers.cloudflare.com/pages/) with [Workers integration](https://developers.cloudflare.com/pages/functions/).

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-cloudflare)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-cloudflare/CHANGELOG.md).
npm package: @sveltejs/adapter-cloudflare-workers
Description: SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering
Latest version: 2.9.0
Deprecated: This package has been replaced by @sveltejs/adapter-cloudflare - See https://svelte.dev/docs/kit/adapter-cloudflare#Migrating-from-Workers-Sites

# adapter-cloudflare-workers

SvelteKit adapter that creates a Cloudflare Workers site using a function for dynamic server rendering.

**Requires [Wrangler v2](https://developers.cloudflare.com/workers/wrangler/get-started/).** Wrangler v1 is no longer supported.

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-cloudflare-workers)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-cloudflare-workers/CHANGELOG.md).
npm package: @sveltejs/adapter-netlify
Description: A SvelteKit adapter that creates a Netlify app
Latest version: 6.0.4

# adapter-netlify

A SvelteKit adapter that creates a Netlify app.

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-netlify)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-netlify/CHANGELOG.md).
npm package: @sveltejs/adapter-node
Description: Adapter for SvelteKit apps that generates a standalone Node server
Latest version: 5.5.4

# @sveltejs/adapter-node

[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that generates a standalone Node server.

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-node)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-node/CHANGELOG.md).

## License

[MIT](LICENSE)
npm package: @sveltejs/adapter-static
Description: Adapter for SvelteKit apps that prerenders your entire site as a collection of static files
Latest version: 3.0.10

# @sveltejs/adapter-static

[Adapter](https://svelte.dev/docs/kit/adapters) for SvelteKit apps that prerenders your entire site as a collection of static files. It's also possible to create an SPA with it by specifying a fallback page which renders an empty shell. If you'd like to prerender only some pages and not create an SPA for those left out, you will need to use a different adapter together with [the `prerender` option](https://svelte.dev/docs/kit/page-options#prerender).

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-static)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-static/CHANGELOG.md).

## License

[MIT](LICENSE)
npm package: @sveltejs/adapter-vercel
Description: A SvelteKit adapter that creates a Vercel app
Latest version: 6.3.3

# adapter-vercel

A SvelteKit adapter that creates a Vercel app.

## Docs

[Docs](https://svelte.dev/docs/kit/adapter-vercel)

## Changelog

[The Changelog for this package is available on GitHub](https://github.com/sveltejs/kit/blob/main/packages/adapter-vercel/CHANGELOG.md).