本文整理匯總了TypeScript中@angular/compiler/src/output/output_ast.THIS_EXPR類的典型用法代碼示例。如果您正苦於以下問題:TypeScript THIS_EXPR類的具體用法?TypeScript THIS_EXPR怎麽用?TypeScript THIS_EXPR使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了THIS_EXPR類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: beforeEach
beforeEach(() => { callSomeMethod = o.THIS_EXPR.callMethod('someMethod', []).toStmt(); });
示例2:
export var codegenStmts: o.Statement[] = [
new o.CommentStmt('This is a comment'),
new o.ClassStmt(
'DynamicClass', o.importExpr(testDataIdentifier),
[
new o.ClassField('dynamicProp', o.DYNAMIC_TYPE),
new o.ClassField('dynamicChangeable', o.DYNAMIC_TYPE),
new o.ClassField('closure', o.FUNCTION_TYPE)
],
[
new o.ClassGetter('dynamicGetter',
[
new o.ReturnStatement(o.literalMap([
['data', o.THIS_EXPR.prop('data')],
['dynamicProp', o.THIS_EXPR.prop('dynamicProp')]
]))
],
new o.MapType(o.DYNAMIC_TYPE))
],
new o.ClassMethod(null,
[
new o.FnParam('dataParam', o.DYNAMIC_TYPE),
new o.FnParam('dynamicPropParam', o.DYNAMIC_TYPE)
],
[
o.SUPER_EXPR.callFn([o.variable('dataParam')])
.toStmt(),
o.THIS_EXPR.prop('dynamicProp')
.set(o.variable('dynamicPropParam'))