Refactor repo-projects.ts (#32892)
- Remove jQuery - Add types to all functions - Tested all modified functionality --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
dc8f59baa5
commit
141d782c1a
8 changed files with 148 additions and 235 deletions
|
@ -1,6 +1,7 @@
|
|||
import type {SortableOptions, SortableEvent} from 'sortablejs';
|
||||
import type SortableType from 'sortablejs';
|
||||
|
||||
export async function createSortable(el: Element, opts: {handle?: string} & SortableOptions = {}) {
|
||||
export async function createSortable(el: Element, opts: {handle?: string} & SortableOptions = {}): Promise<SortableType> {
|
||||
// @ts-expect-error: wrong type derived by typescript
|
||||
const {Sortable} = await import(/* webpackChunkName: "sortablejs" */'sortablejs');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue