Visitar URL original
Expand types for new methods isFullscreen, requestFullscreen and event 'fullscreenChanged' · Issue #73171 · DefinitelyTyped/DefinitelyTyped · GitHub
Skip to content

Expand types for new methods isFullscreen, requestFullscreen and event 'fullscreenChanged' #73171

Open

Description

@kjkTommy

There was a problem with new methods, I had to extend types with my own hands, everything seems to work, but in TeamCity it fails on types added by me
Property 'isFullscreen' does not exist on type 'WebApp'.
Also please add types for requestFullscreen and fullscreenChanged event

#14 [build_telegram 1/1] RUN --mount=type=cache,target=/root/.cache/yarn,id=yarn_cache     set -a && . "./.env.dev" && set +a && yarn telegram:build
#14 3.515 [sentry-webpack-plugin] Warning: No release name provided. Will not inject release. Please set the `release.name` option to identify your release.
#14 3.515 [sentry-webpack-plugin] Warning: No release name provided. Will not create release. Please set the `release.name` option to identify your release.
#14 4.013 Browserslist: caniuse-lite is outdated. Please run:
#14 4.013   npx update-browserslist-db@latest
#14 4.013   Why you should do it regularly: https://github.com/browserslist/update-db#readme
#14 155.4 assets by status 8.03 MiB [cached] 24 assets
#14 155.4 Entrypoint bundle = bundle.css static/js/bundle.46ae4df6.js 19 auxiliary assets
#14 155.4 orphan modules 9.27 MiB (javascript) 1.2 MiB (asset) 1.93 KiB (runtime) [orphan] 4387 modules
#14 155.4 runtime modules 1.28 KiB 7 modules
#14 155.4 cacheable modules 8.67 MiB (javascript) 1.19 MiB (asset) 12.8 KiB (css/mini-extract)
#14 155.4   javascript modules 8.67 MiB 180 modules
#14 155.4   modules by path ../../packages/ 252 bytes (javascript) 1.19 MiB (asset) 12.8 KiB (css/mini-extract)
#14 155.4     modules by layer 252 bytes (javascript) 1.19 MiB (asset)
#14 155.4       modules by path ../../packages/ui/src/ 168 bytes (javascript) 1.09 MiB (asset) 4 modules
#14 155.4       modules by path ../../packages/navigation/src/ 84 bytes (javascript) 105 KiB (asset) 2 modules
#14 155.4     css modules 12.8 KiB
#14 155.4       css ../../node_modules/css-loader/dist/cjs.js!../../packages/ui/src/assets/fonts/fonts.css 1.84 KiB [built] [code generated]
#14 155.4       css ../../node_modules/css-loader/dist/cjs.js!../../packages/ui/src/assets/globalWebStyles/globalWebStyles.css 10.9 KiB [built] [code generated]
#14 155.4   modules by path ../../node_modules/@react-navigation/elements/lib/module/ 84 bytes (javascript) 1.09 KiB (asset)
#14 155.4     ../../node_modules/@react-navigation/elements/lib/module/assets/back-icon.png 42 bytes (javascript) 207 bytes (asset) [built] [code generated]
#14 155.4     ../../node_modules/@react-navigation/elements/lib/module/assets/back...(truncated) 42 bytes (javascript) 913 bytes (asset) [built] [code generated]
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:33:64
#14 155.4 TS2339: Property 'isFullscreen' does not exist on type 'TelegramWebApp'.
#14 155.4     31 |
#14 155.4     32 |   @observable.ref private accessor _appShouldBeClosed: boolean = false;
#14 155.4   > 33 |   @observable.ref private accessor _isFullscreen: boolean = tg.isFullscreen;
#14 155.4        |                                                                ^^^^^^^^^^^^
#14 155.4     34 |
#14 155.4     35 |   get appShouldBeClosed() {
#14 155.4     36 |     return this._appShouldBeClosed;
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:56:26
#14 155.4 TS2339: Property 'isFullscreen' does not exist on type 'WebApp'.
#14 155.4     54 |
#14 155.4     55 |   requestFullscreen() {
#14 155.4   > 56 |     if (!Telegram.WebApp.isFullscreen) {
#14 155.4        |                          ^^^^^^^^^^^^
#14 155.4     57 |       tg.requestFullscreen();
#14 155.4     58 |     }
#14 155.4     59 |   }
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:57:10
#14 155.4 TS2339: Property 'requestFullscreen' does not exist on type 'TelegramWebApp'.
#14 155.4     55 |   requestFullscreen() {
#14 155.4     56 |     if (!Telegram.WebApp.isFullscreen) {
#14 155.4   > 57 |       tg.requestFullscreen();
#14 155.4        |          ^^^^^^^^^^^^^^^^^
#14 155.4     58 |     }
#14 155.4     59 |   }
#14 155.4     60 |
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:83:10
#14 155.4 TS2339: Property 'requestFullscreen' does not exist on type 'TelegramWebApp'.
#14 155.4     81 |     this._closeOtherLocalInstances();
#14 155.4     82 |     if (this.isTelegramWeb) {
#14 155.4   > 83 |       tg.requestFullscreen();
#14 155.4        |          ^^^^^^^^^^^^^^^^^
#14 155.4     84 |     }
#14 155.4     85 |   }
#14 155.4     86 |
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:88:29
#14 155.4 TS2769: No overload matches this call.
#14 155.4   The last overload gave the following error.
#14 155.4     Argument of type '"fullscreenChanged"' is not assignable to parameter of type '"biometricTokenUpdated"'.
#14 155.4     86 |
#14 155.4     87 |   private _listenFullscreenChanges() {
#14 155.4   > 88 |     Telegram.WebApp.onEvent('fullscreenChanged', () => {
#14 155.4        |                             ^^^^^^^^^^^^^^^^^^^
#14 155.4     89 |       runInAction(() => {
#14 155.4     90 |         this._isFullscreen = Telegram.WebApp.isFullscreen;
#14 155.4     91 |       });
#14 155.4
#14 155.4 ERROR in src/TelegramMiniApp/TelegramMiniAppService.ts:90:46
#14 155.4 TS2339: Property 'isFullscreen' does not exist on type 'WebApp'.
#14 155.4     88 |     Telegram.WebApp.onEvent('fullscreenChanged', () => {
#14 155.4     89 |       runInAction(() => {
#14 155.4   > 90 |         this._isFullscreen = Telegram.WebApp.isFullscreen;
#14 155.4        |                                              ^^^^^^^^^^^^
#14 155.4     91 |       });
#14 155.4     92 |     });
#14 155.4     93 |   }
#14 155.4
#14 155.4 webpack 5.95.0 compiled with 6 errors in 151033 ms
#14 ERROR: process "/bin/sh -c set -a && . \"./.env.$NC_WALLET_ENV\" && set +a && yarn telegram:build" did not complete successfully: exit code: 1
------
 > [build_telegram 1/1] RUN --mount=type=cache,target=/root/.cache/yarn,id=yarn_cache     set -a && . "./.env.dev" && set +a && yarn telegram:build:
155.4 TS2339: Property 'isFullscreen' does not exist on type 'WebApp'.
155.4     88 |     Telegram.WebApp.onEvent('fullscreenChanged', () => {
155.4     89 |       runInAction(() => {
155.4   > 90 |         this._isFullscreen = Telegram.WebApp.isFullscreen;
155.4        |                                              ^^^^^^^^^^^^
155.4     91 |       });
155.4     92 |     });
155.4     93 |   }
155.4
155.4 webpack 5.95.0 compiled with 6 errors in 151033 ms

Activity

  1. KuSh commented on Oct 11, 2025

    @KuSh
    Contributor

    Fixed with #72656

  2. mahmoodhamdi commented on Mar 15, 2026

    @mahmoodhamdi

    This has been fixed by #72656 as noted above. This issue can be closed.

  3. ashrafumair111-lab commented on Sep 1, 2026

    @ashrafumair111-lab

    /attempt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions