// Unity Type Definitions for OneJS // https://github.com/Singtaa/unity-types // // Usage: // npm install unity-types // // Add to tsconfig.json: // { "compilerOptions": { "types": ["unity-types"] } } // // Then use CS.* types directly: // const go = new CS.UnityEngine.GameObject("MyObject") // const vec = new CS.UnityEngine.Vector3(1, 2, 3) /// /// /// /// /// /// /// /// /// /// // ============================================================================= // CS as a runtime value // At runtime, CS is a Proxy object created by QuickJSBootstrap.js that provides // access to all C# types. This declaration makes it usable as both a namespace // (for type annotations) and a value (for runtime usage like CS.UnityEngine.GameObject.Find(...)). // ============================================================================= declare const CS: typeof CS; // ============================================================================= // ES6 Module Declarations // Allows ES6-style imports: import { GameObject } from "UnityEngine" // ============================================================================= declare module "UnityEngine" { export = CS.UnityEngine; } declare module "UnityEngine/UIElements" { export = CS.UnityEngine.UIElements; } declare module "UnityEngine/SceneManagement" { export = CS.UnityEngine.SceneManagement; } declare module "System" { export = CS.System; } declare module "System/Collections/Generic" { export = CS.System.Collections.Generic; } declare module "OneJS" { export = CS.OneJS; }