A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
* @file WeChatSocket.ts
* @brief WeChat's binding of the mini-game family socket.
*
* @deprecated Use {@link MiniGameSocket}, which takes the host global explicitly
* and serves every vendor of the family. This subclass only reads `wx` off the
* global scope for callers that constructed it by name.
*/
import { MiniGameSocket } from './MiniGameSocket';
import type { MiniGameGlobal } from '../platform/minigame/api';
import type { GameSocketOptions } from './GameSocket';
export class WeChatSocket extends MiniGameSocket {
constructor(options: GameSocketOptions) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
super(options, (globalThis as any).wx as MiniGameGlobal);
}
}