本文整理匯總了TypeScript中core/util/string.use_strict函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript use_strict函數的具體用法?TypeScript use_strict怎麽用?TypeScript use_strict使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了use_strict函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: Function
/*protected*/ _make_code(valname: string, formatname: string, varsname: string, fn: string): Function {
// this relies on keys(args) and values(args) returning keys and values
// in the same order
return new Function(...keys(this.args), valname, formatname, varsname, "require", "exports", use_strict(fn))
}
示例2: func
get func(): Function {
const code = use_strict(this.code)
return new Function("ctx", "color", "scale", "weight", "require", "exports", code)
}
示例3: _make_transform
protected _make_transform(name: string, func: string): Function {
const code = this.use_strict ? use_strict(func) : func
return new Function(...this.names, name, "require", "exports", code)
}
示例4: func
get func(): Function {
const code = this.use_strict ? use_strict(this.code) : this.code
return new Function(...this.names, "source", "require", "exports", code)
}
示例5: _make_func
protected _make_func(): Function {
const code = this.use_strict ? use_strict(this.code) : this.code
return new Function("tick", "index", "ticks", ...this.names, "require", "exports", code)
}