本文整理汇总了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)
}