type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
/** * Save the idp-url again */ saveOptions() { if (this.form.valid) { this.workspace.proxyConfiguration.proxyUrl = this.form.controls['proxyUrl'].value; this.workspace.proxyConfiguration.proxyProtocol = this.form.controls['proxyProtocol'].value; this.workspace.proxyConfiguration.proxyPort =...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
/** * Check if we need a dialog box to request restarting the application */ checkIfNeedDialogBox() { return this.form.controls['proxyUrl'].value !== undefined && this.form.controls['proxyUrl'].value !== null && (this.form.controls['proxyUrl'].dirty || this.form.controls['proxyProtocol'].di...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
/** * Return to home screen */ goBack() { this.router.navigate(['/', 'sessions', 'session-selected']).then(_ => {}); }
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
manageIdpUrl(id) { const idpUrl = this.workspaceService.getIdpUrl(id); if (this.form.get('idpUrl').value !== '') { if (!idpUrl) { this.workspaceService.addIdpUrl({ id: uuid.v4(), url: this.form.get('idpUrl').value }); } else { this.workspaceService.updateIdpUrl(id, this.form.get('id...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
editIdpUrl(id) { const idpUrl = this.workspace.idpUrls.filter(u => u.id === id)[0]; this.idpUrlValue = idpUrl; this.form.get('idpUrl').setValue(idpUrl.url); this.editingIdpUrl = true; }
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
deleteIdpUrl(id) { // Assumable sessions with this id this.sessionService = this.sessionProviderService.getService(SessionType.awsIamRoleFederated); let sessions = this.sessionService.list().filter(s => (s as AwsIamRoleFederatedSession).idpUrlId === id); // Add iam Role Chained from iam role iam_feder...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
async manageAwsProfile(id: string | number) { const profileIndex = this.workspaceService.getWorkspace().profiles.findIndex(p => p.id === id.toString()); if (this.form.get('awsProfile').value !== '') { if (profileIndex === -1) { this.workspaceService.addProfile({ id: uuid.v4(), name: this.form.ge...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
editAwsProfile(id: string) { const profile = this.workspace.profiles.filter(u => u.id === id)[0]; this.awsProfileValue = profile; this.form.get('awsProfile').setValue(profile.name); this.editingAwsProfile = true; }
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
MethodDeclaration
deleteAwsProfile(id: string) { // With profile const sessions = this.awsSessionService.list().filter(sess => (sess as any).profileId === id); // Get only names for display let sessionsNames = sessions.map(s => `<li><div class="removed-sessions"><b>${s.sessionName}</b> - <small>${(s as AwsIamRoleFedera...
dnsmichi/leapp
src/app/components/shared/profile-page/profile-page.component.ts
TypeScript
FunctionDeclaration
export function validate(params: AddTokenParams, balances: Balances): ErrorState { const { address } = params if (!address) { return invalidInput('address', 'Token address is required') } if (!isValidAddress(address)) { logger.error(`Invalid token address: ${address}`) return invalidInput('address'...
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
FunctionDeclaration
function* addToken(params: AddTokenParams) { const balances = yield* select((state: RootState) => state.wallet.balances) validateOrThrow(() => validate(params, balances), 'Invalid Token') const newToken = yield* call(getTokenInfo, params.address) yield* put(addTokenAction(newToken)) yield* put(fetchBalance...
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
FunctionDeclaration
export function* addTokensById(ids: Set<string>) { for (const id of ids) { try { const knownToken = findTokenById(id) if (!knownToken) continue const newToken = yield* call(getTokenInfo, knownToken.address, knownToken) yield* put(addTokenAction(newToken)) } catch (error) { logge...
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
FunctionDeclaration
async function getTokenInfo(tokenAddress: string, knownToken?: Token): Promise<Token> { knownToken = knownToken || findTokenByAddress(tokenAddress) const contract = getTokenContract(tokenAddress) // Note this assumes the existence of decimals, symbols, and name methods, // which are technically optional. May r...
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
ArrowFunction
(state: RootState) => state.wallet.balances
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
ArrowFunction
() => validate(params, balances)
Chimoney/celo-web-wallet
src/features/wallet/balances/addToken.ts
TypeScript
ArrowFunction
(event) => this.onOkButtonClicked(event)
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
ArrowFunction
(event) => this.onCancelButtonClicked(event)
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
ArrowFunction
element => { element.disabled = block; }
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
ArrowFunction
(user) => { //console.log(user.username + " :: " + user.computerName + " :: " + user.threadId + " :: " + user.server + " :: " + this.message); this.server.sendUserMessage( user.username, user.computerName, user.threadId, user.server, this.message, user.environment); progressbar.progre...
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
ClassDeclaration
@customElement('monitor-send-message-dialog') export class MonitorSendMessageDialog extends MonitorDialog { get message(): string { let message = this.renderRoot.querySelector<MonitorTextInput>('#message').value; return message; } @property({ type: String, reflect: true, attribute: true }) get progress(): P...
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
MethodDeclaration
blockControls(block: boolean) { this.renderRoot.querySelectorAll<MonitorTextInput>('monitor-text-input') .forEach((element => { element.disabled = block; })); this.renderRoot.querySelectorAll<MonitorButton>('monitor-button') .forEach((element => { element.disabled = block; })); }
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
MethodDeclaration
onOkButtonClicked(event: Event) { this.blockControls(true); this.progress = 'visible'; //Validar inputs aqui if (this.message.length == 0) { // alert ou outro modal com o erro ??? return; } let progressbar = this.renderRoot.querySelector('monitor-linear-progress'), step = 1 / this.users.length; ...
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
MethodDeclaration
onCancelButtonClicked(event: Event) { this.cancel(); }
totvs/tds-monitor-frontend
src/main/ts/monitor-send-message-dialog.ts
TypeScript
FunctionDeclaration
export function sendTelegramMessage(link: Link, store: Store) { if (telegram.accessToken && telegram.chatId) { logger.debug('↗ sending telegram message'); (async () => { const message = Print.productInStock(link); const results = []; for (const chatId of telegram.chatId) { ...
sehuang/streetmerchant
src/notification/telegram.ts
TypeScript
ArrowFunction
async () => { const message = Print.productInStock(link); const results = []; for (const chatId of telegram.chatId) { try { results.push( client.sendMessage( chatId, `${Print.inStock(link, store)}\n${message}` ) ...
sehuang/streetmerchant
src/notification/telegram.ts
TypeScript
ArrowFunction
({ num }: { num: number }) => { const n = num % colors.length const color = colors[n] return ( <svg viewBox="0 0 24 24" fill={color}> <path d="M21.5 24h-19c-1.379 0-2.5-1.122-2.5-2.5v-19c0-1.379 1.122-2.5 2.5-2.5h19c1.379 0 2.5 1.122 2.5 2.5v19c0 1.379-1.122 2.5-2.5 2.5zm-19-23c-.827 0-1.5.673-1...
Tarik02/habra
src/components/svg/UserPlaceholder.tsx
TypeScript
ArrowFunction
(): Struct<string, null> => { return define<string>('email', (value) => isEmail(value)); }
MunifTanjim/toolbox
apps/backend/src/libs/validator/index.ts
TypeScript
ArrowFunction
(value) => isEmail(value)
MunifTanjim/toolbox
apps/backend/src/libs/validator/index.ts
TypeScript
ArrowFunction
(): Struct<string, null> => { return size(string(), 27); }
MunifTanjim/toolbox
apps/backend/src/libs/validator/index.ts
TypeScript
ArrowFunction
result => result.insertedId
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
ClassDeclaration
@Entity({ name: 'user' }) export class UserEntity extends MongoEntity<User> implements User { @Column() _id!: ObjectId; @Column({ index: true, unique: true }) id!: number; @Column({ index: true, unique: true }) idstr!: string; @Column() class!: number; @Column() screen_name!: string; @Colum...
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
TypeAliasDeclaration
export type UserCollection = UserEntity['collection'];
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
MethodDeclaration
async getRandomList({ take }: Pick<PaginationParam, 'take'>) { return { list: await this.collection.aggregate([{ $sample: { size: take } }]).toArray() }; }
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
MethodDeclaration
async insertOne(user: User) { const id = await this.collection .insertOne(user) .then(result => result.insertedId); return this.collection.findOne({ _id: new ObjectId(id) }); }
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
MethodDeclaration
async deleteOne(id: UserID) { await this.collection.deleteOne({ _id: new ObjectId(id) }); return [id]; }
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
MethodDeclaration
async updateOne(id: UserID, user: Partial<User>) { await this.collection.updateOne( { _id: new ObjectId(id) }, { $set: user }, ); return this.collection.findOne({ _id: new ObjectId(id) }); }
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
MethodDeclaration
async findOne(id: UserID) { return this.collection.findOne({ id }); }
DevinDon/demo
apps/weibo-api/src/app/user/user.entity.ts
TypeScript
FunctionDeclaration
// import loadable from "@loadable/component" // const Home = loadable(() => import("../Home")) // const Login = loadable(() => import("../Login")) export default function App() { return ( <BrowserRouter> <Suspense fallback={<Loading text="loading contents..." />}
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"terrace"*/"../Terrace")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"carrier"*/"../Carrier")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"home"*/"../Home")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"school" */"../School")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"cinema" */"../Cinema")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"court" */"../Court")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"transportation" */"../Transportation")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"cosmodrome" */"../Cosmodrome")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"dam" */"../Dam")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"gymnasium" */"../Gymnasium")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"hospital" */"../Hospital")
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
() => import(/*webpackChunkName:"bank" */'../Bank')
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
ArrowFunction
()=>import(/*webpackChunkName:"government" */'../Government')
WenJiang99/new-media-re
src/screens/App/index.tsx
TypeScript
FunctionDeclaration
export function validateXsd(): ThunkAction<Promise<void>, State, void, Action> { return async (dispatch, getState) => { dispatch({ type: Types.LoadValidation_Start } as LoadValidationStartAction); const state = getState(); const projectRevision = currentProjectRevisionSelector(state); ...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
function pushError(id: string, err: ValidationError) { if (!result[id]) { result[id] = [] as ValidationError[]; } result[id].push(err); }
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
function calculateLineInformation(tree: Dictionary<XsdElement>): RowColumnResult { const root = xsdRootElementSelector(tree); if (!root) { throw new Error("Missing root element."); } // First line is always <?xml> header const [res] = calculateElementPositions(tree, root, 2, 1, 2); ret...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
function calculateElementPositions( tree: Dictionary<XsdElement>, el: XsdElement, baseRow: number, baseColumn: number, indent: number, ): [RowColumnResult, number] { const result: RowColumnResult = { attributes: new Map(), elements: [], }; const attributes = values(el.a...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
function countNewlines(str: string): number { return [...str].filter(ch => ch === '\n').length; }
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
async function doValidation(xsd: string, baseURI: string | undefined): Promise<ValidationError[]> { const resp = await fetch(`${API_BACKEND_URL}/validate`, { body: JSON.stringify({ xsd, baseURI }), method: 'post', headers: { 'Accept': JSON_MIME, 'Content-Type': JSON_...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
FunctionDeclaration
function validateDuplicateAttributes(xsd: Dictionary<XsdElement>): Dictionary<ValidationError[]> { const result = {}; values(xsd).forEach(element => { const attributes = values(element.attributes); const counted = attributes.reduce( (store, attr) => Object.assign(store, { [attr.nam...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
async (dispatch, getState) => { dispatch({ type: Types.LoadValidation_Start } as LoadValidationStartAction); const state = getState(); const projectRevision = currentProjectRevisionSelector(state); if (!projectRevision) { throw new Error("Missing project!"); } ...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
([line]) => line
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
([start]) => start
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
(a, b) => a.position - b.position
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
id => tree[id]
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
el => el
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
ch => ch === '\n'
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
element => { const attributes = values(element.attributes); const counted = attributes.reduce( (store, attr) => Object.assign(store, { [attr.name]: (store[attr.name] || 0) + 1 }), {}, ); Object.keys(counted) .filter(name => counted[name] > 1) ...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
(store, attr) => Object.assign(store, { [attr.name]: (store[attr.name] || 0) + 1 })
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
name => counted[name] > 1
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
name => { attributes.filter(attr => attr.name === name) .forEach(attr => result[attr.id] = [{ column: 0, line: 0, // tslint:disable-next-line:max-line-length message: `Duplicate attribute...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
attr => attr.name === name
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
attr => result[attr.id] = [{ column: 0, line: 0, // tslint:disable-next-line:max-line-length message: `Duplicate attribute '${name}'. This will lead to unexpected results in the final XSD.`, }]
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
InterfaceDeclaration
export interface LoadValidationFailAction extends PayloadAction<Error> { type: Types.LoadValidation_Fail; error: true; }
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
InterfaceDeclaration
export interface LoadValidationFinishAction extends PayloadAction<Dictionary<ValidationError[]>> { type: Types.LoadValidation_Finish; }
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
InterfaceDeclaration
export interface LoadValidationStartAction { type: Types.LoadValidation_Start; }
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
InterfaceDeclaration
interface RowColumnResult { /** * The starting and ending positions of attributes by corresponding element * and attribute ID. */ attributes: Map<string, [number, number, string][]>; /** * The starting line and outer length of all elements. */ elements: [number, number, string...
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
TypeAliasDeclaration
export type ValidationActions = | LoadValidationFailAction | LoadValidationFinishAction | LoadValidationStartAction;
FIT-Mobility/dimo-tool-suite
frontend/src/actions/components/editor/validation.ts
TypeScript
ArrowFunction
() => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [RouterTestingModule], declarations: [AppComponent] }).compileComponents(); })); it("should create the app", () => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.comp...
calvinlauco/sample-chain-wallet
src/app/app.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ imports: [RouterTestingModule], declarations: [AppComponent] }).compileComponents(); }
calvinlauco/sample-chain-wallet
src/app/app.component.spec.ts
TypeScript
ArrowFunction
() => { const fixture = TestBed.createComponent(AppComponent); const app = fixture.debugElement.componentInstance; expect(app.title).toEqual("crypto.com-chain-wallet"); }
calvinlauco/sample-chain-wallet
src/app/app.component.spec.ts
TypeScript
ArrowFunction
async ( client: AxiosHttpClient, payload: {} ): Promise<AxiosResponse> => { return client.request({ url: '', method: 'post', data: payload, }) }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { return [ { jsonrpc: '2.0', method: defaultSupportedMethods[0], }, { id: '1', jsonrpc: '2.0', method: defaultSupportedMethods[0], }, { id: 1, method: defaultSupportedMethods[0], }, { id: 1, jsonrpc: 2.0, method: defaultSup...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { const fullnodeHandler: FullnodeHandler = new DummyFullnodeHandler() let fullnodeRpcServer: FullnodeRpcServer let baseUrl: string let client: AxiosHttpClient beforeEach(() => { fullnodeRpcServer = new FullnodeRpcServer(fullnodeHandler, host, port) fullnodeRpcServer.listen() baseUrl = `h...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { fullnodeRpcServer = new FullnodeRpcServer(fullnodeHandler, host, port) fullnodeRpcServer.listen() baseUrl = `http://${host}:${port}` client = new AxiosHttpClient(baseUrl) }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { if (!!fullnodeRpcServer) { fullnodeRpcServer.close() } }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { it('should work for valid requests & methods', async () => { const results: AxiosResponse[] = await Promise.all( Array.from(defaultSupportedMethods).map((x) => request(client, { id: 1, jsonrpc: '2.0', method: x }) ) ) results.forEach((r) => { r.status.sh...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const results: AxiosResponse[] = await Promise.all( Array.from(defaultSupportedMethods).map((x) => request(client, { id: 1, jsonrpc: '2.0', method: x }) ) ) results.forEach((r) => { r.status.should.equal(200) r.data.should.haveOwnProperty('id'...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(x) => request(client, { id: 1, jsonrpc: '2.0', method: x })
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(r) => { r.status.should.equal(200) r.data.should.haveOwnProperty('id') r.data['id'].should.equal(1) r.data.should.haveOwnProperty('jsonrpc') r.data['jsonrpc'].should.equal('2.0') r.data.should.haveOwnProperty('result') r.data['result'].should.equal(dummyRespo...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const results: AxiosResponse[] = await Promise.all( getBadPayloads().map((x) => request(client, x)) ) results.forEach((r) => { r.status.should.equal(200) r.data.should.haveOwnProperty('id') r.data.should.haveOwnProperty('jsonrpc') r.data.should.h...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(x) => request(client, x)
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(r) => { r.status.should.equal(200) r.data.should.haveOwnProperty('id') r.data.should.haveOwnProperty('jsonrpc') r.data.should.haveOwnProperty('error') r.data['jsonrpc'].should.equal('2.0') }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const result: AxiosResponse = await request(client, { id: 1, jsonrpc: '2.0', method: revertMethod, }) result.status.should.equal(200) result.data.should.haveOwnProperty('id') result.data.should.haveOwnProperty('jsonrpc') result.data.should.hav...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
() => { it('should work for valid requests & methods', async () => { const batchRequest = Array.from( defaultSupportedMethods ).map((method, id) => ({ jsonrpc: '2.0', id, method })) const result: AxiosResponse = await request(client, batchRequest) result.status.should.equal(200) ...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const batchRequest = Array.from( defaultSupportedMethods ).map((method, id) => ({ jsonrpc: '2.0', id, method })) const result: AxiosResponse = await request(client, batchRequest) result.status.should.equal(200) const results = result.data results.forEach((r, ...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(method, id) => ({ jsonrpc: '2.0', id, method })
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(r, id) => { r.should.haveOwnProperty('id') r['id'].should.equal(id) r.should.haveOwnProperty('jsonrpc') r['jsonrpc'].should.equal('2.0') r.should.haveOwnProperty('result') r['result'].should.equal(dummyResponse) }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const result: AxiosResponse = await request(client, getBadPayloads()) result.status.should.equal(200) const results = result.data results.forEach((r) => { r.should.haveOwnProperty('id') r.should.haveOwnProperty('jsonrpc') r.should.haveOwnProperty('error')...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(r) => { r.should.haveOwnProperty('id') r.should.haveOwnProperty('jsonrpc') r.should.haveOwnProperty('error') r['jsonrpc'].should.equal('2.0') }
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
async () => { const batchOfBatches = Array.from( defaultSupportedMethods ).map((method, id) => [{ jsonrpc: '2.0', id, method }]) const result: AxiosResponse = await request(client, batchOfBatches) result.status.should.equal(200) const results = result.data results.forEach(...
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript
ArrowFunction
(method, id) => [{ jsonrpc: '2.0', id, method }]
Genysys/optimism-monorepo
packages/rollup-full-node/test/app/fullnode-rpc-server.spec.ts
TypeScript