diff --git a/types/screenfull/index.d.ts b/types/screenfull/index.d.ts new file mode 100644 index 0000000000..2c7b93e453 --- /dev/null +++ b/types/screenfull/index.d.ts @@ -0,0 +1,85 @@ +// Type definitions for screenfull.js 4.0 +// Project: https://github.com/sindresorhus/screenfull.js +// Definitions by: Ilia Choly +// lionelb +// Joel Shepherd +// BendingBender +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.5 + +export = screenfull; +export as namespace screenfull; + +declare const screenfull: screenfull.Screenfull | false; + +declare namespace screenfull { + interface Screenfull { + /** + * Returns a boolean whether fullscreen is active. + */ + readonly isFullscreen: boolean; + /** + * Returns the element currently in fullscreen, otherwise `null`. + */ + readonly element: Element | null; + /** + * Returns a boolean whether you are allowed to enter fullscreen. If your page is inside an `