type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
getEnvironment(w: Workflow): Observable<Environment> { if (this.destNode.context.environment_id) { if (w.environments && w.environments[this.destNode.context.environment_id]) { return of(w.environments[this.destNode.context.environment_id]); } return this._en...
Kerguillec/cds
ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts
TypeScript
MethodDeclaration
getProjectIntegration(w: Workflow): Observable<ProjectIntegration> { if (this.destNode.context.project_integration_id) { return of(this.project.integrations.find(i => i.id === this.destNode.context.project_integration_id)); } return of(null); }
Kerguillec/cds
ui/src/app/shared/workflow/modal/node-add/workflow.trigger.component.ts
TypeScript
ArrowFunction
index => this.setState({ index })
limaofeng/vpsny
src/components/TabView.tsx
TypeScript
ArrowFunction
props => ( <TabBar {...props}
limaofeng/vpsny
src/components/TabView.tsx
TypeScript
ClassDeclaration
export default class TabView extends React.Component { static propTypes = { navigationState: PropTypes.object.isRequired, renderScene: PropTypes.func.isRequired }; constructor(props) { super(props); const { navigationState } = props; this.state = navigationState; } _handleIndexChange = ...
limaofeng/vpsny
src/components/TabView.tsx
TypeScript
InterfaceDeclaration
export interface IInsertionPoint { ignore: boolean; commentStrOffset: number; }
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
InterfaceDeclaration
export interface ILinePreflightData { ignore: boolean; commentStr: string; commentStrOffset: number; commentStrLength: number; }
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
InterfaceDeclaration
export interface IPreflightData { supported: boolean; shouldRemoveComments: boolean; lines: ILinePreflightData[]; }
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
InterfaceDeclaration
export interface ISimpleModel { getLineContent(lineNumber: number): string; }
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
EnumDeclaration
export const enum Type { Toggle = 0, ForceAdd = 1, ForceRemove = 2 }
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Do an initial pass over the lines and gather info about the line comment string. * Returns null if any of the lines doesn't support a line comment string. */ public static _gatherPreflightCommentStrings(model: ITextModel, startLineNumber: number, endLineNumber: number): ILinePreflightData[] { model.token...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Analyze lines and decide which lines are relevant and what the toggle should do. * Also, build up several offsets and lengths useful in the generation of editor operations. */ public static _analyzeLines(type: Type, model: ISimpleModel, lines: ILinePreflightData[], startLineNumber: number): IPreflightData {...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Analyze all lines and decide exactly what to do => not supported | insert line comments | remove line comments */ public static _gatherPreflightData(type: Type, model: ITextModel, startLineNumber: number, endLineNumber: number): IPreflightData { const lines = LineCommentCommand._gatherPreflightCommentString...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Given a successful analysis, execute either insert line comments, either remove line comments */ private _executeLineComments(model: ISimpleModel, builder: editorCommon.IEditOperationBuilder, data: IPreflightData, s: Selection): void { let ops: IIdentifiedSingleEditOperation[]; if (data.shouldRemoveComm...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
private _attemptRemoveBlockComment(model: ITextModel, s: Selection, startToken: string, endToken: string): IIdentifiedSingleEditOperation[] { let startLineNumber = s.startLineNumber; let endLineNumber = s.endLineNumber; let startTokenAllowedBeforeColumn = endToken.length + Math.max( model.getLineFirstNonWhit...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Given an unsuccessful analysis, delegate to the block comment command */ private _executeBlockComment(model: ITextModel, builder: editorCommon.IEditOperationBuilder, s: Selection): void { model.tokenizeIfCheap(s.startLineNumber); let languageId = model.getLanguageIdAtPosition(s.startLineNumber, 1); let ...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
public getEditOperations(model: ITextModel, builder: editorCommon.IEditOperationBuilder): void { let s = this._selection; this._moveEndPositionDown = false; if (s.startLineNumber < s.endLineNumber && s.endColumn === 1) { this._moveEndPositionDown = true; s = s.setEndPosition(s.endLineNumber - 1, model.ge...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
public computeCursorState(model: ITextModel, helper: editorCommon.ICursorStateComputerData): Selection { let result = helper.getTrackedSelection(this._selectionId); if (this._moveEndPositionDown) { result = result.setEndPosition(result.endLineNumber + 1, 1); } return new Selection( result.selectionStar...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Generate edit operations in the remove line comment case */ public static _createRemoveLineCommentsOperations(lines: ILinePreflightData[], startLineNumber: number): IIdentifiedSingleEditOperation[] { let res: IIdentifiedSingleEditOperation[] = []; for (let i = 0, len = lines.length; i < len; i++) { co...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Generate edit operations in the add line comment case */ public static _createAddLineCommentsOperations(lines: ILinePreflightData[], startLineNumber: number): IIdentifiedSingleEditOperation[] { let res: IIdentifiedSingleEditOperation[] = []; for (let i = 0, len = lines.length; i < len; i++) { const li...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
// TODO@Alex -> duplicated in characterHardWrappingLineMapper private static nextVisibleColumn(currentVisibleColumn: number, tabSize: number, isTab: boolean, columnSize: number): number { if (isTab) { return currentVisibleColumn + (tabSize - (currentVisibleColumn % tabSize)); } return currentVisibleColumn + co...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
MethodDeclaration
/** * Adjust insertion points to have them vertically aligned in the add line comment case */ public static _normalizeInsertionPoint(model: ISimpleModel, lines: IInsertionPoint[], startLineNumber: number, tabSize: number): void { let minVisibleColumn = Number.MAX_VALUE; let j: number; let lenJ: number; for...
AeliusSaionji/vscode
src/vs/editor/contrib/comment/lineCommentCommand.ts
TypeScript
ClassDeclaration
@Controller('auth') export class AuthController { constructor(private readonly authService: AuthService) {} @Post('register') createUser(@Body() authData: CreateUserDTO): Promise<IRESTResponse> { return this.authService.createUser(authData); } @Post('login') login(@Body() authData: LoginDTO): Promise<...
cod3hunter/food-service-api
src/auth/auth.controller.ts
TypeScript
MethodDeclaration
@Post('register') createUser(@Body() authData: CreateUserDTO): Promise<IRESTResponse> { return this.authService.createUser(authData); }
cod3hunter/food-service-api
src/auth/auth.controller.ts
TypeScript
MethodDeclaration
@Post('login') login(@Body() authData: LoginDTO): Promise<IRESTResponse> { return this.authService.login(authData); }
cod3hunter/food-service-api
src/auth/auth.controller.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Output>, callback?: BodyResponseCallback<Schema$Output>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options.rootUrl || ...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Analyze>, callback?: BodyResponseCallback<Schema$Analyze>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options.rootUrl |...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<void>, callback?: BodyResponseCallback<void>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options.rootUrl || 'https://www.googl...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Training>, callback?: BodyResponseCallback<Schema$Training>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options....
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Training>, callback?: BodyResponseCallback<Schema$Training>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options....
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$List>, callback?: BodyResponseCallback<Schema$List>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options.rootUrl || 'htt...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Output>, callback?: BodyResponseCallback<Schema$Output>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options.rootUrl || ...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(params: any, options: MethodOptions|BodyResponseCallback<Schema$Training>, callback?: BodyResponseCallback<Schema$Training>) => { if (typeof options === 'function') { callback = options; options = {}; } options = options || {}; const rootUrl = options....
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ClassDeclaration
// TODO: We will eventually get the `any` in here cleared out, but in the // interim we want to turn on no-implicit-any. // tslint:disable: no-any // tslint:disable: class-name // tslint:disable: variable-name // tslint:disable: jsdoc-format /** * Prediction API * * Lets you access a cloud hosted machine learning se...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ClassDeclaration
export class Resource$Hostedmodels { root: Prediction; constructor(root: Prediction) { this.root = root; } /** * prediction.hostedmodels.predict * @desc Submit input and request an output against a hosted model. * @alias prediction.hostedmodels.predict * @memberOf! () * * @param {object}...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$Analyze { /** * Description of the data the model was trained on. */ dataDescription: any; /** * List of errors with the data. */ errors: any[]; /** * The unique name for the predictive model. */ id: string; /** * What kind of resource this is. */ kind: s...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$Input { /** * Input to the model for a prediction */ input: any; }
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$List { /** * List of models. */ items: Schema$Training[]; /** * What kind of resource this is. */ kind: string; /** * Pagination token to fetch the next page, if one exists. */ nextPageToken: string; /** * A URL to re-request this resource. */ selfLink: s...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$Output { /** * The unique name for the predictive model. */ id: string; /** * What kind of resource this is. */ kind: string; /** * The most likely class label [Categorical models only]. */ outputLabel: string; /** * A list of class labels with their estimated...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$Training { /** * Insert time of the model (as a RFC 3339 timestamp). */ created: string; /** * The unique name for the predictive model. */ id: string; /** * What kind of resource this is. */ kind: string; /** * Model metadata. */ modelInfo: any; /** ...
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
InterfaceDeclaration
export interface Schema$Update { /** * The input features for this instance */ csvInstance: any[]; /** * The class label of this instance */ label: string; /** * The generic output value - could be regression value or class label */ output: string; }
samaystops4no1/google-api-nodejs-client
src/apis/prediction/v1.5.ts
TypeScript
ArrowFunction
(mockData: TopologyDataResources) => { const workloadResources = getWorkloadResources(mockData, TEST_KINDS_MAP, WORKLOAD_TYPES); return getOperatorTopologyDataModel('test-project', mockData, workloadResources).then((model) => { const fullModel = baseDataModelGetter(model, 'test-project', mockData, workloadReso...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(model) => { const fullModel = baseDataModelGetter(model, 'test-project', mockData, workloadResources, []); operatorsDataModelReconciler(fullModel, mockData); return fullModel; }
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(id: string, graphData: Model): NodeModel => { return graphData.nodes.find((n) => n.id === id); }
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.id === id
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(name: string, graphData: Model): NodeModel => { return graphData.nodes.find((n) => n.label === name); }
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.label === name
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
() => { let mockResources: TopologyDataResources; let filters; beforeEach(() => { mockResources = _.cloneDeep(MockResources); filters = _.cloneDeep(DEFAULT_TOPOLOGY_FILTERS); filters.push(...getTopologyFilters()); }); it('should return graph nodes for operator backed services', async () => { ...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
() => { mockResources = _.cloneDeep(MockResources); filters = _.cloneDeep(DEFAULT_TOPOLOGY_FILTERS); filters.push(...getTopologyFilters()); }
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const graphData = await getTransformedTopologyData(mockResources); const operatorBackedServices = _.filter(graphData.nodes, { type: TYPE_OPERATOR_BACKED_SERVICE, }); expect(operatorBackedServices).toHaveLength(1); expect(getNodeById(operatorBackedServices[0].id, graphData).type)...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => !n.group
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.group
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const icon = _.get(mockResources.clusterServiceVersions.data[0], 'spec.icon.0'); const csvIcon = getImageForCSVIcon(icon); const graphData = await getTransformedTopologyData(mockResources); const node = getNodeByName('jaeger-all-in-one-inmemory', graphData); expect((node.data.data as...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const topologyTransformedData = await getTransformedTopologyData(mockResources); getFilterById(EXPAND_OPERATORS_RELEASE_FILTER, filters).value = false; const newModel = updateModelFromFilters( topologyTransformedData, filters, ALL_APPLICATIONS_KEY, filterers, ); ...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.group && n.collapsed
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const topologyTransformedData = await getTransformedTopologyData(mockResources); getFilterById(EXPAND_OPERATORS_RELEASE_FILTER, filters).value = true; getFilterById(EXPAND_GROUPS_FILTER_ID, filters).value = false; const newModel = updateModelFromFilters( topologyTransformedData, ...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.type === TYPE_OPERATOR_BACKED_SERVICE && n.collapsed
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const topologyTransformedData = await getTransformedTopologyData(mockResources); getFilterById(SHOW_GROUPS_FILTER_ID, filters).value = false; const newModel = updateModelFromFilters( topologyTransformedData, filters, ALL_APPLICATIONS_KEY, filterers, ); expect(n...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.type === TYPE_OPERATOR_BACKED_SERVICE
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const graphData = await getTransformedTopologyData(mockResources); filters.push({ type: TopologyDisplayFilterType.kind, id: 'jaegertracing.io~v1~Jaeger', label: 'Jaeger', priority: 1, value: true, }); const newModel = updateModelFromFilters(graphData, filters...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
(n) => n.type === TYPE_WORKLOAD
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const deployments = sbrBackingServiceSelector.deployments.data; const obsGroups = getOperatorGroupResources(mockResources); const sbrs = sbrBackingServiceSelector.serviceBindingRequests.data; const installedOperators = mockResources?.clusterServiceVersions?.data; expect(getServiceBin...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
async () => { const deployments = sbrBackingServiceSelectors.deployments.data; const obsGroups = getOperatorGroupResources(mockResources); const sbrs = sbrBackingServiceSelectors.serviceBindingRequests.data; const installedOperators = mockResources?.clusterServiceVersions?.data; expect(getServiceB...
Jayashree-panda/console
frontend/packages/topology/src/operators/__tests__/operator-data-transformer.spec.ts
TypeScript
ArrowFunction
() => { finallyCallback(); }
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
ArrowFunction
(result: AuthenticateResultModel) => { this.processAuthenticateResult(result); }
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
ClassDeclaration
@Injectable() export class AppAuthService { authenticateModel: AuthenticateModel; authenticateResult: AuthenticateResultModel; rememberMe: boolean; constructor( private _tokenAuthService: TokenAuthServiceProxy, private _router: Router, private _utilsService: UtilsService, ...
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
MethodDeclaration
logout(reload?: boolean): void { abp.auth.clearToken(); abp.utils.setCookieValue( AppConsts.authorization.encryptedAuthTokenName, undefined, undefined, abp.appPath ); if (reload !== false) { location.href = AppConsts.appBaseUrl...
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
MethodDeclaration
authenticate(finallyCallback?: () => void): void { finallyCallback = finallyCallback || (() => { }); this._tokenAuthService .authenticate(this.authenticateModel) .pipe( finalize(() => { finallyCallback(); }) ) ...
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
MethodDeclaration
private processAuthenticateResult( authenticateResult: AuthenticateResultModel ) { this.authenticateResult = authenticateResult; if (authenticateResult.accessToken) { // Successfully logged in this.login( authenticateResult.accessToken, ...
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
MethodDeclaration
private login( accessToken: string, encryptedAccessToken: string, expireInSeconds: number, rememberMe?: boolean ): void { const tokenExpireDate = rememberMe ? new Date(new Date().getTime() + 1000 * expireInSeconds) : undefined; this._tokenSer...
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
MethodDeclaration
private clear(): void { this.authenticateModel = new AuthenticateModel(); this.authenticateModel.rememberClient = false; this.authenticateResult = null; this.rememberMe = false; }
priyanka091088/EmployeeManagement-BoilerPlate
angular/src/shared/auth/app-auth.service.ts
TypeScript
ClassDeclaration
@Pipe({ name: "newLineToBr", }) export default class NewLineToBrPipe implements PipeTransform { public transform(text: string): string { return text.replace(/\n/g, "<br/>"); } }
burkovsky/AnthonyCakes2
src/app/products/shared/new-line-to-br.pipe.ts
TypeScript
MethodDeclaration
public transform(text: string): string { return text.replace(/\n/g, "<br/>"); }
burkovsky/AnthonyCakes2
src/app/products/shared/new-line-to-br.pipe.ts
TypeScript
EnumDeclaration
export enum EventDef { None = 0, App_CloseFirstLoadingView = 500, AD_OnShareAdFail = 501, //当界面打开 Game_OnViewOpen = 600,//{view : ViewDef} //当界面关闭 Game_OnViewClose = 601,//{view : ViewDef} //当玩家金币变动 Game_OnUserMoneyChange = 701,//{curr:number,last:number} //当玩家钻石变动 Game_On...
renyouwangluo/RYFrameWork
src/Event/EventDef.ts
TypeScript
FunctionDeclaration
/** * A class represents the access keys of SignalR service. */ export function listSignalRKeys(args: ListSignalRKeysArgs, opts?: pulumi.InvokeOptions): Promise<ListSignalRKeysResult> { if (!opts) { opts = {} } if (!opts.version) { opts.version = utilities.getVersion(); } return p...
pulumi-bot/pulumi-azure-native
sdk/nodejs/signalrservice/v20181001/listSignalRKeys.ts
TypeScript
InterfaceDeclaration
export interface ListSignalRKeysArgs { /** * The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. */ readonly resourceGroupName: string; /** * The name of the SignalR resource. */ readonly resourceNam...
pulumi-bot/pulumi-azure-native
sdk/nodejs/signalrservice/v20181001/listSignalRKeys.ts
TypeScript
InterfaceDeclaration
/** * A class represents the access keys of SignalR service. */ export interface ListSignalRKeysResult { /** * SignalR connection string constructed via the primaryKey */ readonly primaryConnectionString?: string; /** * The primary access key. */ readonly primaryKey?: string; /...
pulumi-bot/pulumi-azure-native
sdk/nodejs/signalrservice/v20181001/listSignalRKeys.ts
TypeScript
ArrowFunction
async () => { jest.restoreAllMocks(); }
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { jest.restoreAllMocks(); mockTransaction = TransactionFactory.transfer().createOne(); defaults.hosts = [{ hostname: "127.0.0.1", port: 4000 }]; forgeManager = new ForgerManager(defaults); }
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { it("should forge a block", async () => { // NOTE: make sure we have valid transactions from an existing wallet const transactions = TransactionFactory.transfer() .withNetwork("testnet") .withPassphrase("clay harbor enemy utility margin pretty hub ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { // NOTE: make sure we have valid transactions from an existing wallet const transactions = TransactionFactory.transfer() .withNetwork("testnet") .withPassphrase("clay harbor enemy utility margin pretty hub comic piece aerobic umbrella acquire") ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
tx => tx.serialized.toString("hex")
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { // NOTE: make sure we have valid transactions from an existing wallet const transactions = TransactionFactory.transfer() .withNetwork("testnet") .withPassphrase("clay harbor enemy utility margin pretty hub comic piece aerobic umbrella acquire") ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
timestamp => { return timestamp === undefined ? 1 : 2; }
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { it("should emit failed event if error while monitoring", async () => { forgeManager.client.getRound.mockRejectedValue(new Error("oh bollocks")); setTimeout(() => forgeManager.stopForging(), 1000); await forgeManager.checkSlot(); expect(forgeManager.clie...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { forgeManager.client.getRound.mockRejectedValue(new Error("oh bollocks")); setTimeout(() => forgeManager.stopForging(), 1000); await forgeManager.checkSlot(); expect(forgeManager.client.emitEvent).toHaveBeenCalledWith(ApplicationEvents.ForgerFailed, { ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => forgeManager.stopForging()
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { it("should emit forger.started event", async () => { const passphrase = "secret"; const manager = new ForgerManager(defaults); (manager as any).client.getRound.mockResolvedValueOnce({ delegates: [] }); (manager as any).secrets = [passphrase]; ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { const passphrase = "secret"; const manager = new ForgerManager(defaults); (manager as any).client.getRound.mockResolvedValueOnce({ delegates: [] }); (manager as any).secrets = [passphrase]; const publicKey = Identities.PublicKey.fromPassphrase(...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { it("should return zero transactions if none to forge", async () => { // @ts-ignore forgeManager.client.getTransactions.mockReturnValue({}); const transactions = await forgeManager.getTransactionsForForging(); expect(transactions).toHaveLength(0); ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { // @ts-ignore forgeManager.client.getTransactions.mockReturnValue({}); const transactions = await forgeManager.getTransactionsForForging(); expect(transactions).toHaveLength(0); expect(forgeManager.client.getTransactions).toHaveBeenCalled(); ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { // @ts-ignore forgeManager.client.getTransactions.mockReturnValue({ transactions: [Transactions.TransactionFactory.fromData(mockTransaction).serialized.toString("hex")], }); const transactions = await forgeManager.getTransactionsForForging(...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => { it("should be TRUE when quorum > 0.66", async () => { const networkState = new NetworkState(NetworkStateStatus.Default); Object.assign(networkState, { getQuorum: () => 0.9, nodeHeight: 100, lastBlockId: "1233443" }); const canForge = await forgeManager.isForgingAllo...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { const networkState = new NetworkState(NetworkStateStatus.Default); Object.assign(networkState, { getQuorum: () => 0.9, nodeHeight: 100, lastBlockId: "1233443" }); const canForge = await forgeManager.isForgingAllowed(networkState, delegate); expect(canForg...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => 0.9
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { const networkState = new NetworkState(NetworkStateStatus.Unknown); Object.assign(networkState, { getQuorum: () => 1, nodeHeight: 100, lastBlockId: "1233443" }); const canForge = await forgeManager.isForgingAllowed(networkState, delegate); expect(canForge)...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { const networkState = new NetworkState(NetworkStateStatus.Default); Object.assign(networkState, { getQuorum: () => 0.65, nodeHeight: 100, lastBlockId: "1233443" }); const canForge = await forgeManager.isForgingAllowed(networkState, delegate); expect(canFor...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
() => 0.65
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { const networkState = new NetworkState(NetworkStateStatus.BelowMinimumPeers); const canForge = await forgeManager.isForgingAllowed(networkState, delegate); expect(canForge).toBeFalse(); }
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript
ArrowFunction
async () => { forgeManager.usernames = []; const networkState = new NetworkState(NetworkStateStatus.Default); Object.assign(networkState, { getQuorum: () => 1, nodeHeight: 100, lastBlockId: "1233443", quorumDetails: { ...
Plusid/core-infinity
__tests__/unit/core-forger/manager.test.ts
TypeScript