TypeScript @angular-compiler-src-output-output_ast.THIS_EXPR类(方法)实例源码

下面列出了TypeScript @angular-compiler-src-output-output_ast.THIS_EXPR 类(方法)源码代码实例,从而了解它的用法。

作者:gonzofis    项目:angula   
beforeEach(() => { callSomeMethod = o.THIS_EXPR.callMethod('someMethod', []).toStmt(); });

作者:aftab1066    项目:angula   
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'))


问题


面经


文章

微信
公众号

扫码关注公众号