type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
create(createResourceDTO: CreateResourceDTO): Promise<Resource> {
const resource = new Resource();
resource._id = createResourceDTO._id;
resource.title = createResourceDTO.title;
resource.introText = createResourceDTO.introText;
resource.linkToResource = createResourceDTO.linkTo... | cjlaflamme1/Ascent-Sobriety-Mobile | server/src/resources/resources.service.ts | TypeScript |
MethodDeclaration |
findAll(): Promise<Resource[]> {
return this.resourceRepository.find();
} | cjlaflamme1/Ascent-Sobriety-Mobile | server/src/resources/resources.service.ts | TypeScript |
MethodDeclaration |
findOne(id: string): Promise<Resource> {
return this.resourceRepository.findOne(id);
} | cjlaflamme1/Ascent-Sobriety-Mobile | server/src/resources/resources.service.ts | TypeScript |
MethodDeclaration |
async remove(id: string): Promise<void> {
await this.resourceRepository.delete(id);
} | cjlaflamme1/Ascent-Sobriety-Mobile | server/src/resources/resources.service.ts | TypeScript |
ArrowFunction |
() => {
const articles = [article(1), article(2)]
const articlesComponent = renderer.create(<Articles articles={articles} />).toJSON()
expect(articlesComponent).toMatchSnapshot()
} | orta/remission | emission/src/lib/Components/Artist/__tests__/Articles-tests.tsx | TypeScript |
ArrowFunction |
n => {
return {
__id: `artwork-john-berger-${n}`,
thumbnail_title: "Something Happened",
href: "artsy.net/something-happened",
author: {
name: "John Berger",
},
thumbnail_image: {
url: "artsy.net/image-url",
},
}
} | orta/remission | emission/src/lib/Components/Artist/__tests__/Articles-tests.tsx | TypeScript |
EnumDeclaration | /** https://discord.com/developers/docs/resources/sticker#sticker-object-sticker-format-types */
export enum StickerFormatTypes {
Png = 1,
Apng,
Lottie,
} | AFink/discordeno | types/stickers/stickerFormatTypes.ts | TypeScript |
ClassDeclaration |
@Controller()
export class EventHandlingController {
@Inject(EVENT_CLIENT)
private readonly messagingClient: ClientProxy
@Inject(ACCOUNT_CRUD_SERVICE)
private readonly accountCrudService: AccountCrudService
@Inject(TRANSACTION_CRUD_SERVICE)
private readonly transactionCrudService: ITransactionCrudService... | Hat1ko/microservice-chaos | apps/blockchain/src/modules/event-handling/controller/event-handling.controller.ts | TypeScript |
MethodDeclaration |
@EventPattern(EBlockchainEvent.ACCOUNT_CREATE)
async addAccount(@Payload() payload: IAccountCreate) {
await this.accountCrudService.addAccount(payload)
} | Hat1ko/microservice-chaos | apps/blockchain/src/modules/event-handling/controller/event-handling.controller.ts | TypeScript |
MethodDeclaration |
@Get('trx/:hash')
async sync(@Param('hash') hash) {
const trx = await this.transactionCrudService.getOne(hash)
await this.messagingClient.emit(ETelegramEvent.TRANSACTION_MINED, trx)
console.log(trx)
} | Hat1ko/microservice-chaos | apps/blockchain/src/modules/event-handling/controller/event-handling.controller.ts | TypeScript |
ArrowFunction |
async (
imagePath: string,
width: number,
height: number
): Promise<Buffer> => {
try {
const instance = await Jimp.read(imagePath)
return instance
.cover(width, height)
.quality(60)
.getBufferAsync(Jimp.MIME_JPEG)
} catch (error) {
console... | aquibm/space-holder | src/lib/resizer.ts | TypeScript |
ArrowFunction |
(category: Category) => category.transactions | tomek-i/Budget | backend/src/entity/Transaction.ts | TypeScript |
ClassDeclaration |
@Entity()
export class Transaction implements TransactionType {
constructor(data?: WestpacBankTransaction) {
if (data) {
this.balance = data.Balance;
this.bankAccount = data['Bank Account'];
this.categories = data.Categories as TransactionCategory;
this.creditAmount = data['Credit Amount'... | tomek-i/Budget | backend/src/entity/Transaction.ts | TypeScript |
TypeAliasDeclaration |
export type TransactionPatchRequest = {
balance?: string;
bankAccount?: string;
categories?: string;
creditAmount?: string;
date?: string;
debitAmount?: string;
narrative?: string;
serial?: string;
comment?: string;
category?: string;
}; | tomek-i/Budget | backend/src/entity/Transaction.ts | TypeScript |
ArrowFunction |
() => {
const leakedResources = new Set<string>();
const testVM = getVMManifest(ProvisionSource.CONTAINER, testName);
afterAll(async () => {
removeLeakedResources(leakedResources);
});
describe('Test VM list view kebab dropdown', () => {
const vmName = `vm-list-actions-${testName}`;
let vm: Vir... | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
removeLeakedResources(leakedResources);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
() => {
const vmName = `vm-list-actions-${testName}`;
let vm: VirtualMachine;
beforeAll(async () => {
testVM.metadata.name = vmName;
createResource(testVM);
addLeakableResource(leakedResources, testVM);
vm = new VirtualMachine(testVM.metadata);
// Navigate to Virtual Machine... | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
testVM.metadata.name = vmName;
createResource(testVM);
addLeakableResource(leakedResources, testVM);
vm = new VirtualMachine(testVM.metadata);
// Navigate to Virtual Machines page
await vm.navigateToListView();
await resourceRowsPresent();
await textFilter... | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.listViewAction(VM_ACTION.Start);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.listViewAction(VM_ACTION.Restart);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
pauseVM(vmName, testName);
await vm.listViewAction(VM_ACTION.Unpause);
await vm.waitForStatus(VM_STATUS.Running);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.listViewAction(VM_ACTION.Stop);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.listViewAction(VM_ACTION.Delete, false);
removeLeakableResource(leakedResources, testVM);
await browser.wait(until.stalenessOf(vmLinkByName(vm.name)), VM_DELETE_TIMEOUT_SECS);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
() => {
const vmName = `vm-detail-actions-${testName}`;
const vm = new VirtualMachine({ name: vmName, namespace: testName });
beforeAll(async () => {
testVM.metadata.name = vmName;
createResource(testVM);
addLeakableResource(leakedResources, testVM);
await vm.waitForStatus(VM_STATU... | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
testVM.metadata.name = vmName;
createResource(testVM);
addLeakableResource(leakedResources, testVM);
await vm.waitForStatus(VM_STATUS.Off, VM_IMPORT_TIMEOUT_SECS);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.detailViewAction(VM_ACTION.Start);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.detailViewAction(VM_ACTION.Restart);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
pauseVM(vmName, testName);
await vm.waitForStatus(VM_STATUS.Paused);
await vm.detailViewAction(VM_ACTION.Unpause);
await vm.waitForStatus(VM_STATUS.Running);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.waitForStatus(VM_STATUS.Running);
pauseVM(vmName, testName);
await vm.waitForStatus(VM_STATUS.Paused);
await vm.modalEditStatus();
await click(unpauseButton);
await vm.waitForStatus(VM_STATUS.Running);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.detailViewAction(VM_ACTION.Stop);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
ArrowFunction |
async () => {
await vm.detailViewAction(VM_ACTION.Delete, false);
removeLeakableResource(leakedResources, testVM);
await browser.wait(until.stalenessOf(vmLinkByName(vm.name)), VM_DELETE_TIMEOUT_SECS);
} | alecmerdler/console | frontend/packages/kubevirt-plugin/integration-tests/tests/vm.action.base.scenario.ts | TypeScript |
InterfaceDeclaration |
export interface SystemGroup<T = any> extends FunctionInputProps {
type: T;
systemsService: Interpreter<SystemContext, any, SystemEvent>;
systems: System<T>[];
} | LeanScope/ecs-core | src/model/systems/SystemGroup.ts | TypeScript |
ArrowFunction |
async (t, {typescript}) => {
const bundle = await generateRollupBundle(
[
{
entry: true,
fileName: "index.ts",
text: `\
export * from "./bar";
export * from "./baz";
`
},
{
entry: false,
fileName: "bar.ts",
text: `\
export * from "./a";
`
},
{
entr... | clemyan/rollup-plugin-ts | test/statement-merge.test.ts | TypeScript |
ArrowFunction |
file => file.fileName.includes("index.d.ts") | clemyan/rollup-plugin-ts | test/statement-merge.test.ts | TypeScript |
ArrowFunction |
file => file.fileName.includes("a.d.ts") | clemyan/rollup-plugin-ts | test/statement-merge.test.ts | TypeScript |
ArrowFunction |
async (t, {typescript}) => {
const bundle = await generateRollupBundle(
[
{
entry: true,
fileName: "index.ts",
text: `\
export * from "./bar";
export * from "./baz";
`
},
{
entry: false,
fileName: "bar.ts",
text: `\
export {foo as bar} from "./a";
`
},
... | clemyan/rollup-plugin-ts | test/statement-merge.test.ts | TypeScript |
ArrowFunction |
async (t, {typescript}) => {
const bundle = await generateRollupBundle(
[
{
entry: true,
fileName: "index.ts",
text: `\
import {BuiltInParser} from './bar';
import {Bar} from "./bar";
export interface Foo extends Bar {
x: BuiltInParser;
}
`
},
... | clemyan/rollup-plugin-ts | test/statement-merge.test.ts | TypeScript |
ArrowFunction |
async () => {
try {
const res = await fetch(`${pendingUserUrl}api_key=${api_key}`, {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const response: PendingResponse[] = await res.json();
return response;
} catch (err... | itsaladin/Eub_Alumni | src/service/pending.ts | TypeScript |
ArrowFunction |
async () => {
try {
const res = await fetch(`${approvedUsers}api_key=${api_key}`, {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const response: PendingResponse[] = await res.json();
console.log(JSON.stringify(respo... | itsaladin/Eub_Alumni | src/service/pending.ts | TypeScript |
InterfaceDeclaration |
export interface PendingResponse {
id: string;
stdId: string;
name: string;
company: string;
designation: string;
batch: string;
roll: string;
department: string;
passyear: number;
email: string;
phone: string;
blood: string;
password: string;
submission: string;
submissionTitle: string;
... | itsaladin/Eub_Alumni | src/service/pending.ts | TypeScript |
ClassDeclaration |
@command()
export class StashApplyCommand extends Command {
constructor() {
super(Commands.StashApply);
}
protected async preExecute(
context: CommandContext,
args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }
) {
if (isCommandViewContextWithCommit<GitS... | sgtwilko/vscode-gitlens | src/commands/stashApply.ts | TypeScript |
InterfaceDeclaration |
export interface StashApplyCommandArgs {
confirm?: boolean;
deleteAfter?: boolean;
repoPath?: string;
stashItem?: { stashName: string; message: string; repoPath: string };
goBackCommand?: CommandQuickPickItem;
} | sgtwilko/vscode-gitlens | src/commands/stashApply.ts | TypeScript |
MethodDeclaration |
protected async preExecute(
context: CommandContext,
args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }
) {
if (isCommandViewContextWithCommit<GitStashCommit>(context)) {
args = { ...args };
args.stashItem = context.node.commit;
return th... | sgtwilko/vscode-gitlens | src/commands/stashApply.ts | TypeScript |
MethodDeclaration |
async execute(args: StashApplyCommandArgs = { confirm: true, deleteAfter: false }) {
args = { ...args };
if (args.stashItem === undefined || args.stashItem.stashName === undefined) {
if (args.repoPath === undefined) {
args.repoPath = await getRepoPathOrPrompt(
... | sgtwilko/vscode-gitlens | src/commands/stashApply.ts | TypeScript |
ClassDeclaration | /** @hidden */
declare class UndoRedo {
/** @hidden */
modes: Readonly<{
NONE: "none";
AUTO: "auto";
}>;
/** @hidden */
constructor(airtableInterface: AirtableInterface);
/** @hidden */
get mode(): UndoRedoMode;
/** @hidden */
set mode(mode: UndoRedoMode);
} | admariner/scheduler | node_modules/@airtable/blocks/dist/types/src/undo_redo.d.ts | TypeScript |
ArrowFunction |
({
error,
label,
type,
placeholder,
value,
handleChange,
isTextField = false,
}) => (
<Box m={5}>
<FormControl isRequired | YASM-Media/yasm | client/src/components/form/formField.component.tsx | TypeScript |
TypeAliasDeclaration |
export type FormFieldProps = {
error?:
| string
| string[]
| FormikErrors<any>
| FormikErrors<any>[]
| undefined;
label: string;
type: string;
placeholder: string;
value: string;
handleChange: React.ChangeEventHandler<
HTMLInputElement | HTMLTextAreaElement
>;
isTextField?: bool... | YASM-Media/yasm | client/src/components/form/formField.component.tsx | TypeScript |
FunctionDeclaration | /*
* Determines if on the basis of the user input the users intention to pay back
* all of their debt.
*/
function determineShouldPaybackAll({
paybackAmount,
debt,
debtOffset,
daiBalance,
}: Pick<ManageMultiplyVaultState, 'paybackAmount'> &
Pick<Vault, 'debt' | 'debtOffset'> &
Pick<BalanceInfo, 'daiBalan... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the expected lockedCollateral on the basis of the amount
* of collateral that is being deposited or withdrawn. Must return a
* non-negative value
*/
function calculateAfterLockedCollateral({
lockedCollateral,
paybackAmount,
generateAmount,
}: Pick<ManageMultiplyVaultState, 'paybackAmount' |... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the expected debt in the vault on the basis of the amount of
* dai the user is generating or paying back. Must return a non-negative value
*
* If the shouldPaybackAll flag is true than we assume that the debt after
* the transaction will be 0
*/
function calculateAfterDebt({
shouldPaybackAll,... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the minimum amount of collateral necessary to back the
* expected debt in the vault on the basis of the amount of dai the user is
* generating or paying back
*
*/
function calculateAfterBackingCollateral({
afterDebt,
liquidationRatio,
price,
}: Pick<ManageMultiplyVaultState, 'afterDebt'> &... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the maximum amount of collateral that can be possibly
* withdrawn given the amount of collateral being deposited or withdrawn and
* the amount of dai being generated or payed back. It should return a
* non-negative value
*/
function calculateAfterFreeCollateral({
lockedCollateral,
backingCol... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the maximum amount of collateral that can be withdrawn given
* the current amount of locked collateral in the vault and factoring in the
* amount of collateral that would be freed if the user was paying back
*
* We must also account for the potential accrual in vault debt which decreases
* the ... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration |
function calculateAfterIlkDebtAvailable({ ilkDebtAvailable }: Pick<IlkData, 'ilkDebtAvailable'>) {
if (ilkDebtAvailable.gt(zero)) {
return ilkDebtAvailable.gte(zero) ? ilkDebtAvailable : zero
}
return zero
} | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the amount of dai that can be generated given the amount of
* potential collateral and debt in the vault
*/
function calculateDaiYieldFromCollateral({
debt,
liquidationRatio,
price,
collateral,
ilkDebtAvailable,
}: Pick<Vault, 'debt'> &
Pick<IlkData, 'liquidationRatio' | 'ilkDebtAvaila... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration | /*
* Should return the maximum amount of dai that can be generated in context
* of what collateral currently exists and is being deposited as well as the
* debt already existing in the vault.
*
* It should also not exceed the debt ceiling for that ilk and also account
* for the accrued interest should the vault d... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration |
function calculateMultiply({
debt,
lockedCollateralUSD,
}: {
debt: BigNumber
lockedCollateralUSD: BigNumber
}) {
return lockedCollateralUSD.div(lockedCollateralUSD.minus(debt))
} | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration |
export function getVaultChange({
requiredCollRatio,
depositAmount,
paybackAmount,
generateAmount,
withdrawAmount,
slippage,
currentCollateralPrice,
marketPrice,
debt,
lockedCollateral,
FF,
OF,
}: {
requiredCollRatio: BigNumber | undefined
depositAmount: BigNumber
paybackAmount: BigNumbe... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
InterfaceDeclaration |
export interface ManageVaultCalculations {
maxBuyAmount: BigNumber
maxBuyAmountUSD: BigNumber
maxSellAmount: BigNumber
maxSellAmountUSD: BigNumber
maxDepositAmount: BigNumber
maxDepositAmountUSD: BigNumber
maxPaybackAmount: BigNumber
maxWithdrawAmountAtCurrentPrice: BigNumber
maxWithdrawAmountAtN... | adamskrodzki/oasis-borrow | features/manageMultiplyVault/manageMultiplyVaultCalculations.ts | TypeScript |
FunctionDeclaration |
function TestIntegrationPage(props: { providerConnections: ProviderConnection[]; clusterCurators?: ClusterCurator[] }) {
return (
<RecoilRoot
initializeState={(snapshot) => {
snapshot.set(secretsState, props.providerConnections as Secret[])
snapshot.set(clusterCu... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
() => {
beforeEach(nockIgnoreRBAC)
test('should render the table with templates', async () => {
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator1.metadata!.name!)
await waitFor(() => expect(... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator1.metadata!.name!)
await waitFor(() => expect(testLocation.pathname).toEqual(NavigationPath.ansibleAutomations))
} | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
() => expect(testLocation.pathname).toEqual(NavigationPath.ansibleAutomations) | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
const deleteNock = nockDelete(clusterCurator2)
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator2.metadata!.name!)
await clickByLabel('Actions', 1) // Click the action button on ... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
const badRequestStatus = nockDelete(clusterCurator2, mockBadRequestStatus)
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator2.metadata!.name!)
await clickByLabel('Actions', 1) //... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator2.metadata!.name!)
await clickByLabel('Actions', 1) // Click the action button on the first table row
await clickByText('Delete')... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
const deleteNock1 = nockDelete(clusterCurator2)
const deleteNock2 = nockDelete(clusterCurator1)
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator1.metadata!.name!)
await ... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
async () => {
render(<TestIntegrationPage providerConnections={mockProviderConnections} clusterCurators={clusterCurators} />)
await waitForText(clusterCurator1.metadata!.name!)
await selectTableRow(1)
await clickBulkAction('Delete templates')
await clickByText('Cancel')
... | RobDolares/console | frontend/src/routes/Infrastructure/Automations/AnsibleAutomations.test.tsx | TypeScript |
ArrowFunction |
(oletus: 17012 tai testnet: 17912) | coinkeeper/2015-06-22_18-45_quatloo | src/qt/locale/bitcoin_fi.ts | TypeScript |
ArrowFunction |
(oletus: 17011 or testnet: 17911) | coinkeeper/2015-06-22_18-45_quatloo | src/qt/locale/bitcoin_fi.ts | TypeScript |
ClassDeclaration |
export default class PublishedTag extends Tag{
name: string = 'PublishedTag';
vueParse: any;
constructor (params: any) {
super(params)
this.config.model.custom.label = '已上线';
this.config.model.attr.type = 'success';
this.setAttrsToStr();
}
} | cklwblove/sparrow | packages/sparrow-server/src/lib/adapter-vue/modules/custom/TagCollect/Online/index.ts | TypeScript |
FunctionDeclaration |
export declare function computeData(resourcesPath: string, options?: AsarIntegrityOptions | null): Promise<AsarIntegrity>; | featmo/ORNG | node_modules/asar-integrity/out/main.d.ts | TypeScript |
FunctionDeclaration |
export declare function hashFile(file: string, algorithm: string, encoding?: "hex" | "base64" | "latin1"): BluebirdPromise<string>; | featmo/ORNG | node_modules/asar-integrity/out/main.d.ts | TypeScript |
InterfaceDeclaration |
export interface AsarIntegrityOptions {
/**
* Allows external asar files.
*
* @default false
*/
readonly externalAllowed?: boolean;
} | featmo/ORNG | node_modules/asar-integrity/out/main.d.ts | TypeScript |
InterfaceDeclaration |
export interface AsarIntegrity extends AsarIntegrityOptions {
checksums: {
[key: string]: string;
};
} | featmo/ORNG | node_modules/asar-integrity/out/main.d.ts | TypeScript |
FunctionDeclaration | /**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// THIS CODE IS GENERATED - DO NOT MODIFY
// See angular/tools/gulp-tasks/cldr/extract.js
function plural(n: number):... | AepKill/angular | packages/common/locales/naq.ts | TypeScript |
InterfaceDeclaration | /**
* A interface that describes the actions the RemoteStore needs to perform on
* a cooperating synchronization engine.
*/
export interface RemoteSyncer {
/**
* Applies one remote event to the sync engine, notifying any views of the
* changes, and releasing any pending mutation batches that would become
... | atomita/firebase-js-sdk | packages/firestore/src/remote/remote_syncer.ts | TypeScript |
ClassDeclaration |
export class GetTestGridProjectCommand extends $Command<
GetTestGridProjectCommandInput,
GetTestGridProjectCommandOutput,
DeviceFarmClientResolvedConfig
> {
// Start section: command_properties
// End section: command_properties
constructor(readonly input: GetTestGridProjectCommandInput) {
// Start se... | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
TypeAliasDeclaration |
export type GetTestGridProjectCommandInput = GetTestGridProjectRequest; | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
TypeAliasDeclaration |
export type GetTestGridProjectCommandOutput = GetTestGridProjectResult & __MetadataBearer; | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
MethodDeclaration |
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: DeviceFarmClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<GetTestGridProjectCommandInput, GetTestGridProjectCommandOutput> {
this.middlewareStack.use(getSerdePlugin(configuration, th... | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
MethodDeclaration |
private serialize(input: GetTestGridProjectCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1GetTestGridProjectCommand(input, context);
} | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetTestGridProjectCommandOutput> {
return deserializeAws_json1_1GetTestGridProjectCommand(output, context);
} | blakeembrey/aws-sdk-js-v3 | clients/client-device-farm/commands/GetTestGridProjectCommand.ts | TypeScript |
ArrowFunction |
() => {
const mockStore = configureMockStore();
const ConnectedComponent = getStoreTypedComponent(ConnectedEmptyStateComponent);
it('should pass activeNamespace from state as prop', () => {
const store = mockStore({
UI: ImmutableMap({
activeNamespace: 'project',
}),
});
const to... | abhinandan13jan/console | frontend/packages/dev-console/src/components/__tests__/EmptyState.spec.tsx | TypeScript |
ArrowFunction |
() => {
const store = mockStore({
UI: ImmutableMap({
activeNamespace: 'project',
}),
});
const topologyWrapper = shallow(<ConnectedComponent store={store} title="" />);
expect(topologyWrapper.props().activeNamespace).toEqual('project');
} | abhinandan13jan/console | frontend/packages/dev-console/src/components/__tests__/EmptyState.spec.tsx | TypeScript |
ArrowFunction |
({ name, restart }) => {
return (
<div className="page">
<h1>
{name && `Player ${name} won the game`} | Bavalerio/react-tic-tac-toe-game | src/components/pages/finish-game.tsx | TypeScript |
InterfaceDeclaration |
interface FinishProps {
name: string | null;
restart(): void;
} | Bavalerio/react-tic-tac-toe-game | src/components/pages/finish-game.tsx | TypeScript |
EnumDeclaration |
enum Name {
restar = 'Restart',
} | Bavalerio/react-tic-tac-toe-game | src/components/pages/finish-game.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-linktext',
templateUrl: './linktext.component.html',
styleUrls: ['./linktext.component.css']
})
export class LinktextComponent implements OnInit {
@Input()
titletext!: string;
@Input()
linktext!: string;
time: Date = new Date()
constructor() { }
ngOnInit() {
try ... | edwinmuriithi/Quote-App | src/app/components/linktext/linktext.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
try {
const link: string = this.linktext.split('//')[1];
this.linktext = link.split('/')[0];
} catch (error) {
return this.linktext
}
} | edwinmuriithi/Quote-App | src/app/components/linktext/linktext.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'hs-file-upload',
templateUrl: './upload.html',
})
export class HsUploadComponent {
@Output() uploaded = new EventEmitter<HsUploadedFiles>();
@Input() acceptedFormats: string;
@Input() uploader?: string;
@ViewChild('fileInput') fileInput: ElementRef;
dropzoneActive = false;
emit... | hslayers/hslayers-ng | projects/hslayers/src/common/upload/upload.component.ts | TypeScript |
TypeAliasDeclaration |
export type HsUploadedFiles = {
fileList: FileList;
uploader: string;
dropped: boolean;
}; | hslayers/hslayers-ng | projects/hslayers/src/common/upload/upload.component.ts | TypeScript |
MethodDeclaration |
emitHandleUpload(fileList: FileList, dropped: boolean): void {
this.uploaded.emit({fileList, uploader: this.uploader, dropped});
} | hslayers/hslayers-ng | projects/hslayers/src/common/upload/upload.component.ts | TypeScript |
MethodDeclaration |
dropZoneState($event: boolean): void {
this.dropzoneActive = $event;
} | hslayers/hslayers-ng | projects/hslayers/src/common/upload/upload.component.ts | TypeScript |
MethodDeclaration |
getFileInput(): ElementRef {
return this.fileInput;
} | hslayers/hslayers-ng | projects/hslayers/src/common/upload/upload.component.ts | TypeScript |
ArrowFunction |
({}) => {
useEffect(() => {
GoogleSignin.configure({
webClientId: "673710093763-hbj813nj4h3h183c4ildmu8vvqc0ek4h.apps.googleusercontent.com",
})
}, [])
const isHydrated = GlobalStore.useAppState((state) => state.sessionState.isHydrated)
const isLoggedIn = GlobalStore.useAppState((state) => !!stat... | artsy/eigen | src/lib/AndroidApp.tsx | TypeScript |
ArrowFunction |
() => {
GoogleSignin.configure({
webClientId: "673710093763-hbj813nj4h3h183c4ildmu8vvqc0ek4h.apps.googleusercontent.com",
})
} | artsy/eigen | src/lib/AndroidApp.tsx | TypeScript |
ArrowFunction |
(state) => state.sessionState.isHydrated | artsy/eigen | src/lib/AndroidApp.tsx | TypeScript |
ArrowFunction |
(state) => !!state.auth.userAccessToken | artsy/eigen | src/lib/AndroidApp.tsx | TypeScript |
ArrowFunction |
(state) => state.auth.onboardingState | artsy/eigen | src/lib/AndroidApp.tsx | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.