Skip to content
On this page

环境相关

javascript
//Node版引擎导入方式
import core from 'cheese-node';
//JS版引擎导入方式
const core = require('cheese-js');

sdk版本:sdk_version: string

用法示例:

javascript
const env = core.env;
console.log("SDK版本", env.sdk_version)

cheese-core版本:core_version: string

用法示例:

javascript
const env = core.env;
console.log("cheese-core版本", env.core_version)

cheese-context:context: any

用法示例:

javascript
const env = core.env;
console.log("context", env.context)

cheese-application:application: string

用法示例:

javascript
const env = core.env;
console.log("application", env.application)

cheese-activity:activity: string

用法示例:

javascript
const env = core.env;
console.log("activity", env.activity)

cheese-accessibilityService:accessibilityService: string

用法示例:

javascript
const env = core.env;
console.log("accessibilityService", env.accessibilityService)

cheese-javaObjects:javaObjects: string

用法示例:

javascript
const env = core.env;
console.log("javaObjects", env.javaObjects)

cheese-jsObjects:jsObjects: string

用法示例:

javascript
const env = core.env;
class Person {
    name: string;
    age: number;

    constructor(name: string, age: number) {
        this.name = name;
        this.age = age;
    }
}

env.jsObjects.put("1", person1)