Skip to content

Commit b1981d5

Browse files
author
mishchuk
committed
switch on strictNullChecks
1 parent dfaf041 commit b1981d5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+997
-741
lines changed

dist/types/core/base.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ declare class PhotoSwipeBase extends Eventable {
5656
* @returns {Content} Image that is being decoded or false.
5757
*/
5858
lazyLoadData(itemData: SlideData, index: number): Content;
59+
/**
60+
* @protected
61+
* @param {Partial<PhotoSwipeOptions>} options
62+
* @returns {PhotoSwipeOptions}
63+
*/
64+
protected _prepareOptions(options: Partial<PhotoSwipeOptions>): PhotoSwipeOptions;
5965
}
6066
import Eventable from "./eventable.js";
6167
import Content from "../slide/content.js";

dist/types/core/eventable.d.ts

+290-288
Large diffs are not rendered by default.

dist/types/gestures/zoom-handler.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ declare class ZoomHandler {
4444
* @param {boolean} [ignoreGesture]
4545
* Wether gesture coordinates should be ignored when calculating destination pan position.
4646
*/
47-
correctZoomPan(ignoreGesture?: boolean): void;
47+
correctZoomPan(ignoreGesture?: boolean | undefined): void;
4848
}

dist/types/lightbox/lightbox.d.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ export type EventCallback<T> = import('../core/eventable.js').EventCallback<T>;
4646
*/
4747
declare class PhotoSwipeLightbox extends PhotoSwipeBase {
4848
/**
49-
* @param {PhotoSwipeOptions} options
49+
* @param {Partial<PhotoSwipeOptions>} [options]
5050
*/
51-
constructor(options: PhotoSwipeOptions);
51+
constructor(options?: Partial<import("../photoswipe.js").PhotoSwipeOptions> | undefined);
5252
_uid: number;
5353
/**
5454
* Initialize lightbox, should be called only once.
@@ -72,16 +72,16 @@ declare class PhotoSwipeLightbox extends PhotoSwipeBase {
7272
* @param {DataSource} dataSource
7373
* @param {Point | null} [initialPoint]
7474
*/
75-
loadAndOpen(index: number, dataSource: DataSource, initialPoint?: Point | null): boolean;
76-
shouldOpen: boolean;
75+
loadAndOpen(index: number, dataSource: DataSource, initialPoint?: import("../photoswipe.js").Point | null | undefined): boolean;
76+
shouldOpen: boolean | undefined;
7777
/**
7878
* Load the main module and the slide content by index
7979
*
8080
* @param {number} index
8181
* @param {DataSource=} dataSource
8282
*/
8383
preload(index: number, dataSource?: DataSource | undefined): void;
84-
_preloadedContent: import("../slide/content.js").default;
84+
_preloadedContent: import("../slide/content.js").default | null | undefined;
8585
/**
8686
* @private
8787
* @param {Type<PhotoSwipe> | { default: Type<PhotoSwipe> }} module

dist/types/main-scroll.d.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ declare class MainScroll {
3333
*
3434
* @param {boolean} [resizeSlides] Whether slides content should resized
3535
*/
36-
resize(resizeSlides?: boolean): void;
36+
resize(resizeSlides?: boolean | undefined): void;
3737
/**
3838
* Reset X position of the main scroller to zero
3939
*/
@@ -63,7 +63,7 @@ declare class MainScroll {
6363
* @param {number} [velocityX]
6464
* @returns {boolean} whether index was changed or not
6565
*/
66-
moveIndexBy(diff: number, animate?: boolean, velocityX?: number): boolean;
66+
moveIndexBy(diff: number, animate?: boolean | undefined, velocityX?: number | undefined): boolean;
6767
/**
6868
* X position of the main scroll for the current slide
6969
* (ignores position during dragging)
@@ -86,5 +86,5 @@ declare class MainScroll {
8686
* @param {number} x
8787
* @param {boolean} [dragging]
8888
*/
89-
moveTo(x: number, dragging?: boolean): void;
89+
moveTo(x: number, dragging?: boolean | undefined): void;
9090
}

dist/types/opener.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ declare class Opener {
4747
private _cropContainer1;
4848
/**
4949
* @private
50-
* @type { HTMLElement | undefined }
50+
* @type { HTMLElement | null | undefined }
5151
*/
5252
private _cropContainer2;
5353
/**
@@ -61,7 +61,7 @@ declare class Opener {
6161
close(): void;
6262
/** @private */
6363
private _applyStartProps;
64-
_animateZoom: boolean;
64+
_animateZoom: boolean | undefined;
6565
/** @private */
6666
private _start;
6767
/** @private */

0 commit comments

Comments
 (0)