From 1b0989af10f8b28f7ab76df3917f043dfad8e217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20B=C5=82a=C5=BCejewicz=20=28Peter=20Blazejewicz=29?= Date: Mon, 13 Jul 2020 10:52:13 +0200 Subject: [PATCH] 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! --- types/sortablejs/index.d.ts | 3 +++ types/sortablejs/sortablejs-tests.ts | 2 ++ 2 files changed, 5 insertions(+) diff --git a/types/sortablejs/index.d.ts b/types/sortablejs/index.d.ts index 4ba7edc725..d94f9a5a85 100644 --- a/types/sortablejs/index.d.ts +++ b/types/sortablejs/index.d.ts @@ -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. diff --git a/types/sortablejs/sortablejs-tests.ts b/types/sortablejs/sortablejs-tests.ts index f78555fd5c..5e74930f2c 100644 --- a/types/sortablejs/sortablejs-tests.ts +++ b/types/sortablejs/sortablejs-tests.ts @@ -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 '
item ' + (iterator + 1) + '
';