-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: prepare for TS defs generation [skip ci]
- Loading branch information
1 parent
f31e4ca
commit 5b35538
Showing
4 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"excludeFiles": [ | ||
"index.html", | ||
"wct.conf.js", | ||
"demo/**/*", | ||
"theme/**/*", | ||
"test/**/*" | ||
], | ||
"autoImport": { | ||
"./src/vaadin-combo-box-data-provider.d.ts": [ | ||
"ComboBoxDataProvider" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const tsDep = `"scripts": { | ||
"generate-typings": "gen-typescript-declarations --outDir ." | ||
}, | ||
"devDependencies": { | ||
"@polymer/gen-typescript-declarations": "^1.6.2",`; | ||
|
||
const rootExport = `import './theme/lumo/vaadin-combo-box.js'; | ||
export * from './src/vaadin-combo-box.js'; | ||
`; | ||
|
||
module.exports = { | ||
files: [ | ||
'package.json', | ||
'src/vaadin-combo-box.js', | ||
'src/vaadin-combo-box-light.js', | ||
'vaadin-combo-box.js' | ||
], | ||
from: [ | ||
'"devDependencies": {', | ||
'@mixes Vaadin.ElementMixin', | ||
'@mixes Vaadin.ControlStateMixin', | ||
'@mixes Vaadin.ComboBoxDataProviderMixin', | ||
'@mixes Vaadin.ComboBoxMixin', | ||
'@mixes Vaadin.ThemableMixin', | ||
'@mixes Vaadin.ThemePropertyMixin', | ||
'@memberof Vaadin', | ||
`import './theme/lumo/vaadin-combo-box.js';` | ||
], | ||
to: [ | ||
tsDep, | ||
'@mixes ElementMixin', | ||
'@mixes ControlStateMixin', | ||
'@mixes ComboBoxDataProviderMixin', | ||
'@mixes ComboBoxMixin', | ||
'@mixes ThemableMixin', | ||
'@mixes ThemePropertyMixin', | ||
'@extends PolymerElement', | ||
rootExport | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
export type ComboBoxDataProviderCallback = (items: Array<unknown>, size: number) => void; | ||
|
||
export type ComboBoxDataProviderParams = { | ||
page: number; | ||
|
||
pageSize: number; | ||
|
||
filter: string; | ||
} | ||
|
||
export type ComboBoxDataProvider = (params: ComboBoxDataProviderParams, callback: ComboBoxDataProviderCallback) => void; |