Skip to content

Commit

Permalink
$.fn.data: added a missing TypeScript method overload
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiospampinato committed May 8, 2019
1 parent 3d870d1 commit 0726f62
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/data/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
// @require ./helpers/variables.ts

interface Cash {
data (): plainObject | undefined;
data ( name: string );
data ( name: string, value ): this;
data ( datas: plainObject ): this;
}

function data ( this: Cash ): plainObject | undefined;
function data ( this: Cash, name: string );
function data ( this: Cash, name: string, value ): Cash;
function data ( this: Cash, name: plainObject ): Cash;
function data ( this: Cash, name: string | plainObject, value? ) {
function data ( this: Cash, name?: string | plainObject, value? ) {

if ( !name ) {

Expand Down

0 comments on commit 0726f62

Please sign in to comment.