fix(sortablejs): missing version static property (#45877)

This adds `version` property that DT CI scripts complaints about.

https://github.com/SortableJS/Sortable/blob/master/src/Sortable.js#L1968
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45684#issuecomment-648745109

Thanks!
This commit is contained in:
Piotr Błażejewicz (Peter Blazejewicz) 2020-07-13 10:52:13 +02:00 committed by GitHub
parent 034e05a68e
commit 1b0989af10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,9 @@ declare class Sortable {
/** Get the Sortable instance on an element. */
static get(element: HTMLElement): Sortable | undefined;
/** Get the Sortable version */
static readonly version: string;
/**
* Options getter/setter
* @param name a Sortable.Options property.

View File

@ -77,6 +77,8 @@ simpleList.innerHTML = Array.apply(null, new Array(10))
Sortable.create(simpleList, {});
Sortable.version; // $ExpectType string
simpleList.innerHTML = Array.apply(null, new Array(100))
.map(function(value: any, iterator: number) {
return '<div class="list-group-item">item ' + (iterator + 1) + '</div>';