diff --git a/types/fancybox/fancybox-tests.ts b/types/fancybox/fancybox-tests.ts index eac3f31771..ea6cb7bed4 100644 --- a/types/fancybox/fancybox-tests.ts +++ b/types/fancybox/fancybox-tests.ts @@ -23,7 +23,7 @@ $.fancybox.update(); $.fancybox.toggle(); $.fancybox.showLoading(); $.fancybox.hideLoading(); -$(".selector").fancybox({ 'type': 'image' }); +$(".selector").fancybox({ type: 'image' }); $("#single_1").fancybox({ helpers: { title: { @@ -114,7 +114,7 @@ $(".fancybox").fancybox({ }); $(".fancybox").fancybox({ beforeLoad: () => { - this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : ''); + this.title = this.title ? `Image ${this.index + 1} of ${this.group.length} - ${this.title}` : `Image ${this.index + 1} of ${this.group.length}`; } }); $.fancybox('

Lorem Lipsum

Lorem lipsum

', { @@ -142,4 +142,4 @@ $.fancybox([ $(".fancybox").fancybox({ margin: [20, 60, 20, 60] -}); \ No newline at end of file +}); diff --git a/types/fancybox/index.d.ts b/types/fancybox/index.d.ts index b2e563c367..bafdb142b3 100644 --- a/types/fancybox/index.d.ts +++ b/types/fancybox/index.d.ts @@ -4,7 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 - /// interface FancyboxOptions extends FancyboxCallback { diff --git a/types/fancybox/tslint.json b/types/fancybox/tslint.json new file mode 100644 index 0000000000..1b62a88e52 --- /dev/null +++ b/types/fancybox/tslint.json @@ -0,0 +1,7 @@ +{ + "extends": "dtslint/dt.json", + "rules": { + "ban-types": false, + "unified-signatures": false + } +}