UNPKG

@microsoft.azure/autorest.incubator

Version:
41 lines 2.02 kB
import { Initializer } from '#common/initializer'; import { Expression, ExpressionOrLiteral } from '#csharp/code-dom/expression'; import { OneOrMoreStatements, Statement } from '#csharp/code-dom/statements/statement'; import { TypeDeclaration } from '#csharp/code-dom/type-declaration'; /** represents any declaration of a variable (may be Parameter, LocalVariable, Field or Property) */ export interface Variable extends Expression { assign(expression: ExpressionOrLiteral): OneOrMoreStatements; assignPrivate(expression: ExpressionOrLiteral): OneOrMoreStatements; declarationStatement: Statement; declarationExpression: Expression; } /** A ReferenceVariable can be passed as by 'ref' in C# */ export interface ReferenceVariable extends Variable { byref: Expression; } export interface Instance { invokeMethod(methodName: string, ...parameters: Array<Variable>): ExpressionStatement; } export declare type ExpressionStatement = Expression & Statement; /** represents a locally declared variable */ export declare class LocalVariable extends Initializer implements Variable, Instance, Statement { protected name: string; type: TypeDeclaration; initializer?: ExpressionOrLiteral; constructor(name: string, type: TypeDeclaration, objectIntializer?: Partial<LocalVariable>); readonly value: string; readonly implementation: string; readonly declarationStatement: Statement; readonly declarationExpression: Expression; assign(expression: ExpressionOrLiteral): OneOrMoreStatements; assignPrivate(expression: ExpressionOrLiteral): OneOrMoreStatements; toString(): string; invokeMethod(methodName: string, ...parameters: Array<Expression>): ExpressionStatement; member(memberName: string): MemberVariable; } export declare class MemberVariable extends LocalVariable { private variable; private memberName; constructor(variable: Variable, memberName: string, objectIntializer?: Partial<MemberVariable>); } //# sourceMappingURL=variable.d.ts.map