Skip to content

Commit

Permalink
chore(types): update types def
Browse files Browse the repository at this point in the history
  • Loading branch information
dysfunc committed Jan 14, 2024
1 parent f5fc1e6 commit cbadb68
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 12 deletions.
24 changes: 20 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,35 @@
"ecmaVersion": 2020,
"sourceType": "module"
},
"plugins": ["vitest"],
"extends": ["eslint:recommended", "plugin:vitest/recommended"],
"ignorePatterns": ["**/*.snap.js"],
"plugins": [
"vitest"
],
"extends": [
"eslint:recommended",
"plugin:vitest/recommended"
],
"ignorePatterns": [
"**/*.snap.js"
],
"overrides": [
{
"files": ["*.svelte"],
"files": [
"*.ts"
],
"parser": "@typescript-eslint/parser"
},
{
"files": [
"*.svelte"
],
"parser": "svelte-eslint-parser"
}
],
"rules": {
"eqeqeq": "error",
"no-useless-escape": "off",
"no-unused-expressions": "off",
"no-inner-declarations": "off",
"no-unused-vars": "off",
"no-self-assign": "off",
"no-undef": "off"
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/svelte": "^4.0.5",
"@vitest/coverage-v8": "^0.34.6",
"@tsconfig/svelte": "^5.0.2",
"@types/node": "^20.10.5",
"@typescript-eslint/parser": "^6.18.1",
"@vitest/coverage-v8": "^0.34.6",
"eslint": "^8.54.0",
"eslint-plugin-svelte": "^2.35.1",
"eslint-plugin-vitest": "^0.3.10",
Expand Down
74 changes: 74 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 11 additions & 7 deletions src/datepicker.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { SvelteComponent } from 'svelte';

export interface ComponentProps {
/**
export interface DatePickerProps {
/**
* Represents the start date for a date picker.
* @default null
*/
Expand Down Expand Up @@ -131,8 +131,12 @@ export interface ComponentProps {
monthLabels: string[];
}

export default class Component extends SvelteComponent<
ComponentProps,
Record<string, any>,
{ default: {} }
> {}
export interface DatePickerEvents {
[key: string]: any;
}

export interface DatePickerSlots {
default: {};
}

export default class DatePicker extends SvelteComponent<DatePickerProps, DatePickerEvents, DatePickerSlots> {}

0 comments on commit cbadb68

Please sign in to comment.