Skip to content

Commit 6c3f6d8

Browse files
authoredJan 19, 2024
docs: Use type imports for svelte examples (#5285)
* Import types from svelte-table * Enable verbatimModuleSyntax
1 parent 4e182ec commit 6c3f6d8

File tree

13 files changed

+35
-29
lines changed

13 files changed

+35
-29
lines changed
 

‎examples/svelte/basic/src/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
flexRender,
66
getCoreRowModel,
77
} from '@tanstack/svelte-table'
8-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
8+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
99
import './index.css'
1010
1111
type Person = {

‎examples/svelte/basic/tsconfig.dev.json renamed to ‎examples/svelte/basic/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"useDefineForClassFields": true,
77
"module": "esnext",
88
"resolveJsonModule": true,
9+
"verbatimModuleSyntax": true,
910
"baseUrl": "."
1011
},
1112
"files": ["src/main.ts"],

‎examples/svelte/column-groups/src/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
flexRender,
66
getCoreRowModel,
77
} from '@tanstack/svelte-table'
8-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
8+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
99
import './index.css'
1010
1111
type Person = {

‎examples/svelte/column-groups/tsconfig.dev.json renamed to ‎examples/svelte/column-groups/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"useDefineForClassFields": true,
77
"module": "esnext",
88
"resolveJsonModule": true,
9+
"verbatimModuleSyntax": true,
910
"baseUrl": "."
1011
},
1112
"files": ["src/main.ts"],

‎examples/svelte/column-ordering/src/App.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
getSortedRowModel,
77
flexRender,
88
} from '@tanstack/svelte-table'
9-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
10-
import { makeData, Person } from './makeData'
9+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
10+
import { makeData, type Person } from './makeData'
1111
import { faker } from '@faker-js/faker'
1212
import './index.css'
1313

‎examples/svelte/column-ordering/tsconfig.dev.json renamed to ‎examples/svelte/column-ordering/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"useDefineForClassFields": true,
77
"module": "esnext",
88
"resolveJsonModule": true,
9+
"verbatimModuleSyntax": true,
910
"baseUrl": "."
1011
},
1112
"files": ["src/main.ts"],

‎examples/svelte/column-pinning/src/App.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
getSortedRowModel,
77
flexRender,
88
} from '@tanstack/svelte-table'
9-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
10-
import { makeData, Person } from './makeData'
9+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
10+
import { makeData, type Person } from './makeData'
1111
import { faker } from '@faker-js/faker'
1212
import './index.css'
1313

‎examples/svelte/column-pinning/tsconfig.dev.json renamed to ‎examples/svelte/column-pinning/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"useDefineForClassFields": true,
77
"module": "esnext",
88
"resolveJsonModule": true,
9+
"verbatimModuleSyntax": true,
910
"baseUrl": "."
1011
},
1112
"files": ["src/main.ts"],

‎examples/svelte/column-visibility/src/App.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
getSortedRowModel,
77
flexRender,
88
} from '@tanstack/svelte-table'
9-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
9+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
1010
import './index.css'
1111
1212
type Person = {

‎examples/svelte/column-visibility/tsconfig.dev.json

-20
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"extends": "../../../tsconfig.json",
3+
// "extends": "@tsconfig/svelte/tsconfig.json",
4+
"compilerOptions": {
5+
"target": "esnext",
6+
"useDefineForClassFields": true,
7+
"module": "esnext",
8+
"resolveJsonModule": true,
9+
"verbatimModuleSyntax": true,
10+
"baseUrl": "."
11+
},
12+
"files": ["src/main.ts"],
13+
"include": [
14+
"src"
15+
// "src/**/*.d.ts",
16+
// "src/**/*.ts",
17+
// "src/**/*.js",
18+
// "src/**/*.svelte"
19+
// "__tests__/**/*.test.*"
20+
]
21+
}

‎examples/svelte/sorting/src/App.svelte

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
getSortedRowModel,
77
flexRender,
88
} from '@tanstack/svelte-table'
9-
import type { ColumnDef, TableOptions } from '@tanstack/table-core/src/types'
10-
import { makeData, Person } from './makeData'
9+
import type { ColumnDef, TableOptions } from '@tanstack/svelte-table'
10+
import { makeData, type Person } from './makeData'
1111
import './index.css'
1212
1313
const columns: ColumnDef<Person>[] = [

‎examples/svelte/sorting/tsconfig.dev.json renamed to ‎examples/svelte/sorting/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"useDefineForClassFields": true,
66
"module": "esnext",
77
"resolveJsonModule": true,
8+
"verbatimModuleSyntax": true,
89
"baseUrl": "."
910
},
1011
"files": ["src/main.ts"],

0 commit comments

Comments
 (0)
Please sign in to comment.