Skip to content

Commit

Permalink
types: adapters declaration file (sveltejs#1230)
Browse files Browse the repository at this point in the history
* add adapter-static types

* add adapter-node types

* add adapter-vercel types

* add adapter-cloudflare types

* add adapter-netlify types

* add adapter-begin types

* add fallback argument types

* add changeset
  • Loading branch information
ignatiusmb authored and Philipp Zerelles committed Apr 26, 2021
1 parent ce0888f commit 00794eb
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 5 deletions.
10 changes: 10 additions & 0 deletions .changeset/violet-goats-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@sveltejs/adapter-begin': patch
'@sveltejs/adapter-cloudflare-workers': patch
'@sveltejs/adapter-netlify': patch
'@sveltejs/adapter-node': patch
'@sveltejs/adapter-static': patch
'@sveltejs/adapter-vercel': patch
---

Add type declarations
1 change: 1 addition & 0 deletions packages/adapter-begin/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default function (): import('@sveltejs/kit').Adapter;
4 changes: 3 additions & 1 deletion packages/adapter-begin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@sveltejs/adapter-begin",
"version": "1.0.0-next.5",
"main": "index.cjs",
"types": "index.d.ts",
"scripts": {
"lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",
"dev": "rollup -cw",
Expand All @@ -11,7 +12,8 @@
"prepublishOnly": "npm run build"
},
"files": [
"files"
"files",
"index.d.ts"
],
"dependencies": {
"@architect/parser": "^3.0.1"
Expand Down
3 changes: 3 additions & 0 deletions packages/adapter-cloudflare-workers/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare function plugin(): import('@sveltejs/kit').Adapter;

export = plugin;
4 changes: 3 additions & 1 deletion packages/adapter-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"name": "@sveltejs/adapter-cloudflare-workers",
"version": "0.0.2-next.3",
"main": "index.js",
"types": "index.d.ts",
"files": [
"files"
"files",
"index.d.ts"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",
Expand Down
3 changes: 3 additions & 0 deletions packages/adapter-netlify/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare function plugin(): import('@sveltejs/kit').Adapter;

export = plugin;
4 changes: 3 additions & 1 deletion packages/adapter-netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"name": "@sveltejs/adapter-netlify",
"version": "1.0.0-next.9",
"main": "index.js",
"types": "index.d.ts",
"files": [
"files"
"files",
"index.d.ts"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",
Expand Down
3 changes: 3 additions & 0 deletions packages/adapter-node/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare function plugin(options: { out?: string }): import('@sveltejs/kit').Adapter;

export = plugin;
4 changes: 3 additions & 1 deletion packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
"version": "1.0.0-next.16",
"main": "index.cjs",
"type": "module",
"types": "index.d.ts",
"files": [
"files"
"files",
"index.d.ts"
],
"scripts": {
"dev": "rollup -cw",
Expand Down
7 changes: 7 additions & 0 deletions packages/adapter-static/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare function plugin(options: {
pages?: string;
assets?: string;
fallback?: string;
}): import('@sveltejs/kit').Adapter;

export = plugin;
1 change: 1 addition & 0 deletions packages/adapter-static/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@sveltejs/adapter-static",
"version": "1.0.0-next.6",
"types": "index.d.ts",
"scripts": {
"lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",
"check": "tsc",
Expand Down
3 changes: 3 additions & 0 deletions packages/adapter-vercel/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare function plugin(): import('@sveltejs/kit').Adapter;

export = plugin;
4 changes: 3 additions & 1 deletion packages/adapter-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
"name": "@sveltejs/adapter-vercel",
"version": "1.0.0-next.14",
"main": "index.js",
"types": "index.d.ts",
"files": [
"files"
"files",
"index.d.ts"
],
"scripts": {
"lint": "eslint --ignore-path .gitignore \"**/*.{ts,js,svelte}\" && npm run check-format",
Expand Down

0 comments on commit 00794eb

Please sign in to comment.