type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Updating', intervention);
let api : InterventionApi = new InterventionApi(cfg);
let id : string = getIdFromUri(intervention.id);
... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(resp:Intervention) => {
debug('Response for PUT:', resp);
dispatch({
type: INTERVENTIONS_ADD,
payload: idReducer({}, resp)
});
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(err) => {
console.error('Error on PUT Intervention', err);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(intervention:Intervention) => (dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Deleting', intervention);
let api : InterventionApi = new InterventionApi(cfg);
let id : string = g... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(dispatch) => {
let status : string, cfg : Configuration, user : string;
[status, cfg, user] = getStatusConfigAndUser();
if (status === 'DONE') {
debug('Deleting', intervention);
let api : InterventionApi = new InterventionApi(cfg);
let id : string = getIdFromUri(intervention.id);
... | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
() => {
dispatch({
type: INTERVENTION_DELETE,
uri: intervention.id
});
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
(err) => {
console.error('Error on DELETE Intervention', err);
} | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
InterfaceDeclaration |
interface MCAInterventionsAdd extends Action<'INTERVENTIONS_ADD'> { payload: IdMap<Intervention> } | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
InterfaceDeclaration |
interface MCAInterventionDelete extends Action<'INTERVENTION_DELETE'> { uri: string } | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
TypeAliasDeclaration |
export type ModelCatalogInterventionAction = MCAInterventionsAdd | MCAInterventionDelete; | hvarg/mint-ui-lit | src/model-catalog/intervention-actions.ts | TypeScript |
ArrowFunction |
val => {
switch (val) {
case 'grid': {
this.buttonIcon = this.listIcon;
this.defaultState = 'list';
this.checkGrid.emit('list');
break;
}
case 'list': {
this.buttonIcon = this.gridIcon;
this.defaultState = 'grid';
this.checkGrid.emit('grid')... | dk-extdev/FPR-Angular-Admin | src/main/webapp/app/cf-components/components/grid-button/grid-button.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-grid-button',
templateUrl: './grid-button.component.html',
styleUrls: ['./grid-button.component.scss']
})
export class GridButtonComponent implements OnInit {
listIcon: string = 'list';
gridIcon: string = 'view_module';
buttonIcon: string = '';
@Input() defaultState: string... | dk-extdev/FPR-Angular-Admin | src/main/webapp/app/cf-components/components/grid-button/grid-button.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
switch (this.defaultState) {
case 'grid': {
this.buttonIcon = this.gridIcon;
break;
}
case 'list': {
this.buttonIcon = this.listIcon;
break;
}
default: {
break;
}
}
} | dk-extdev/FPR-Angular-Admin | src/main/webapp/app/cf-components/components/grid-button/grid-button.component.ts | TypeScript |
ArrowFunction |
async () => {
await TestUtil.setupTests(mySandBox);
} | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
executeCommandStub = mySandBox.stub(vscode.commands, 'executeCommand');
executeCommandStub.withArgs(ExtensionCommands.CONNECT_TO_GATEWAY).resolves();
executeCommandStub.callThrough();
fabricClientConnectionMock = sinon.createStubInstance(FabricClientConnec... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
await vscode.commands.executeCommand(ExtensionCommands.DISCONNECT_GATEWAY);
mySandBox.restore();
} | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWith('myContract', 'transaction1', 'myChannel', ['arg1', 'arg2', 'arg3'], 'my-contract');
dockerLogsOutputSpy.should.not.have... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
await vscode.commands.executeCommand(ExtensionCommands.EVALUATE_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWith('myContract', 'transaction1', 'myChannel', ['arg1', 'arg2', 'arg3'], 'my-contract', undefined, true);
dockerLogsOutput... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
getConnectionStub.onCall(2).returns(null);
getConnectionStub.onCall(3).returns(fabricClientConnectionMock);
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWit... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
const registryEntry: FabricGatewayRegistryEntry = new FabricGatewayRegistryEntry();
registryEntry.name = 'myGateway';
registryEntry.managedRuntime = true;
registryStub.returns(registryEntry);
await vscode.commands.executeCommand(ExtensionCommand... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
getConnectionStub.onCall(2).returns(null);
getConnectionStub.onCall(3).returns(null);
await vscode.commands.executeCommand(ExtensionCommands.EVALUATE_TRANSACTION);
executeCommandStub.should.have.been.calledWith(ExtensionCommands.CONNECT_TO_GATEWAY);
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInstantiatedSmartContractQuickPickStub.resolves();
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
reporterStub.should.not.have.been.called;
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
fabricClientConnectionMock.submitTransaction.rejects({ message: 'some error' });
await vscode.commands.executeCommand(ExtensionCommands.EVALUATE_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWith('myContract', 'transaction1', 'myCh... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
fabricClientConnectionMock.submitTransaction.rejects({ message: 'some error', endorsements: [{message: 'another error'}, {message: 'more error'}]});
await vscode.commands.executeCommand(ExtensionCommands.EVALUATE_TRANSACTION);
fabricClientConnectionMock.submitTransac... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showTransactionQuickPickStub.resolves();
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
reporterStub.should.not.have.been.called;
dockerLogsO... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION, undefined, 'myChannel', 'myContract');
fabricClientConnectionMock.submitTransaction.should.have.been.calledWith('myContract', 'transaction1', 'myChannel', ['arg1', 'arg2', 'arg3'], 'my-contract');
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
const myChannel: ChannelTreeItem = allChildren[2] as ChannelTreeItem;
const channelChildren: Array<BlockchainTreeItem> = await blockchainGatewayExplorerProvider.getChildren(myChannel) as Array<BlockchainTreeItem>;
const instantiatedUnknownChainCodes: Array<Instantiat... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
fabricClientConnectionMock.getMetadata.rejects(new Error('no metadata here jack'));
const myChannel: ChannelTreeItem = allChildren[2] as ChannelTreeItem;
const channelChildren: Array<BlockchainTreeItem> = await blockchainGatewayExplorerProvider.getChildren(myChannel)... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
fabricClientConnectionMock.getMetadata.rejects(new Error('no metadata here jack'));
const myChannel: ChannelTreeItem = allChildren[2] as ChannelTreeItem;
const channelChildren: Array<BlockchainTreeItem> = await blockchainGatewayExplorerProvider.getChildren(myChannel)... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves('[]');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWithExactly('myContract', 'transaction1', 'myChannel', [], 'my-contract', unde... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves('');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWithExactly('myContract', 'transaction1', 'myChannel', [], 'my-contract', undefi... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onSecondCall().resolves('{ "key" : "value"}');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.have.been.calledWithExactly('myContract', 'transaction1', 'myChannel', ['arg1... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onSecondCall().resolves(undefined);
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
showInputBoxStub.should.have.been.calledTwice;
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onSecondCall().resolves('{"wrong}');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
showInputBoxStub.should.have.been.calledTwice;
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onSecondCall().resolves('["wrong"]');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
showInputBoxStub.should.have.been.calledTwice;
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onSecondCall().resolves('1');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
showInputBoxStub.should.have.been.calledTwice;
l... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves('["testArg]');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
logSpy.should.have.been.calledTwice;
logSpy.should.have.been.calledWith(LogType.ERROR, 'Error with transaction arguments: Unex... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves('"testArg]');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
logSpy.should.have.been.calledTwice;
logSpy.should.have.been.calledWith(LogType.ERROR, 'Error with transaction arguments: trans... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves('1');
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
logSpy.should.have.been.calledTwice;
logSpy.should.have.been.calledWith(LogType.ERROR, 'Error with transaction arguments: transaction a... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
showInputBoxStub.onFirstCall().resolves(undefined);
await vscode.commands.executeCommand(ExtensionCommands.SUBMIT_TRANSACTION);
fabricClientConnectionMock.submitTransaction.should.not.have.been.called;
showInputBoxStub.should.have.been.calledOnce;
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
const result: string = '{"hello":"world"}';
const outputAdapterShowSpy: sinon.SinonSpy = mySandBox.spy(VSCodeBlockchainOutputAdapter.instance(), 'show');
fabricClientConnectionMock.submitTransaction.resolves(result);
showInputBoxStub.onFirstCall().resolves(... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
ArrowFunction |
async () => {
const result: string = undefined;
const outputAdapterShowSpy: sinon.SinonSpy = mySandBox.spy(VSCodeBlockchainOutputAdapter.instance(), 'show');
fabricClientConnectionMock.submitTransaction.resolves(result);
showInputBoxStub.onFirstCall().resolves('[]');
... | Ravikant-trafers/blockchain-vscode-extension | client/test/commands/submitTransaction.test.ts | TypeScript |
FunctionDeclaration |
export async function installDependencies(
baseDir: string,
deps: any,
dev: boolean = false
) {
const useYarn = shouldUseYarn()
const isOnline = !useYarn || (await getOnline())
if (deps.length) {
console.log()
console.log(`Installing ${dev ? 'devDependencies' : 'dependencies'}:`)
for (const de... | 0xsamrath/blitz | nextjs/packages/next/lib/install-dependencies.ts | TypeScript |
ArrowFunction |
(dep: MissingDependency) => dep.pkg | 0xsamrath/blitz | nextjs/packages/next/lib/install-dependencies.ts | TypeScript |
TypeAliasDeclaration |
export type Dependencies = {
resolved: Map<string, string>
} | 0xsamrath/blitz | nextjs/packages/next/lib/install-dependencies.ts | TypeScript |
ClassDeclaration |
export declare class MatDatepickerInputEvent<D, S = unknown> {
/** Reference to the datepicker input component that emitted the event. */
target: MatDatepickerInputBase<S, D>;
/** Reference to the native input element associated with the datepicker input. */
targetElement: HTMLElement;
/** The new ... | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
ClassDeclaration | /** Base class for datepicker inputs. */
export declare abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection<S>> implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator {
protected _elementRef: ElementRef<HTMLInputElement>;
_dateAdapter: DateAdapter<D>;
private _... | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
TypeAliasDeclaration | /** Function that can be used to filter out dates from a calendar. */
export declare type DateFilterFn<D> = (date: D | null) => boolean; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Gets the base validator functions. */
protected _getValidators(): ValidatorFn[]; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Gets the minimum date for the input. Used for validation. */
abstract _getMinDate(): D | null; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Gets the maximum date for the input. Used for validation. */
abstract _getMaxDate(): D | null; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Gets the date filter function. Used for validation. */
protected abstract _getDateFilter(): DateFilterFn<D> | undefined; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Registers a date selection model with the input. */
_registerModel(model: MatDateSelectionModel<S, D>): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Opens the popup associated with the input. */
protected abstract _openPopup(): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Assigns a value to the input's model. */
protected abstract _assignValueToModel(model: D | null): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Converts a value from the model into a native value for the input. */
protected abstract _getValueFromModel(modelValue: S): D | null; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Predicate that determines whether we're allowed to emit a particular change event. */
protected abstract _canEmitChangeEvent(event: DateSelectionModelChange<S>): boolean; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
ngOnChanges(): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** @docs-private */
registerOnValidatorChange(fn: () => void): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** @docs-private */
validate(c: AbstractControl): ValidationErrors | null; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
writeValue(value: D): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
registerOnChange(fn: (value: any) => void): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
registerOnTouched(fn: () => void): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
_onKeydown(event: KeyboardEvent): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
_onInput(value: string): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration |
_onChange(): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Handles blur events on the input. */
_onBlur(): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /** Formats a value and sets it on the input element. */
protected _formatValue(value: D | null): void; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /**
* @param obj The object to check.
* @returns The given object if it is both a date instance and valid, otherwise null.
*/
protected _getValidDateOrNull(obj: any): D | null; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
MethodDeclaration | /**
* Checks whether a parent control is disabled. This is in place so that it can be overridden
* by inputs extending this one which can be placed inside of a group that can be disabled.
*/
protected _parentDisabled(): boolean; | AlphaAquilae02/book-forum-app | Client/node_modules/@angular/material/datepicker/datepicker-input-base.d.ts | TypeScript |
ArrowFunction |
() => {
it.todo("No tests yet")
} | GoooIce/eigen | src/lib/Scenes/MyAccount/__tests__/MyAccountEditEmail-tests.tsx | TypeScript |
FunctionDeclaration |
function Bird(props: IconProps) {
return (
<Svg
id="Raw"
viewBox="0 0 256 256"
width={props.size}
height={props.size}
{...props}
>
<Rect width={256} height={256} fill="none" />
<Circle cx={160} cy={72} r={16} fill={props.color} />
<Path
d="M208,96v24a96... | kingdavidmartins/phosphor-react-native | src/bold/Bird.tsx | TypeScript |
ArrowFunction |
({
state,
blockId,
txHash,
type,
error,
txTimestamp,
}) => {
switch (state) {
case ETxSenderState.WATCHING_PENDING_TXS:
return <TxExternalPending txHash={txHash!} blockId={blockId} />;
case ETxSenderState.INIT:
if (!type) {
throw new Error("Transaction type needs to be set at... | desfero/platform-frontend | packages/web/app/components/modals/tx-sender/TxSender/TxSenderBody.tsx | TypeScript |
ArrowFunction |
(obj: object): boolean => (Array.isArray(obj) || typeof obj !== 'object') | arcthur/rematch | src/utils/isObject.ts | TypeScript |
FunctionDeclaration |
export function mainNgcc(args: string[]): number {
const formats = args[0] ? args[0].split(',') : ['fesm2015', 'esm2015', 'fesm5', 'esm5'];
const packagePaths = args[1] ? [path.resolve(args[1])] : findPackagesToCompile();
const targetPath = args[2] ? args[2] : 'node_modules';
const transformer = new PackageTr... | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
FunctionDeclaration | // TODO - consider nested node_modules
/**
* Check whether the given folder needs to be included in the ngcc compilation.
* We do not care about folders that are:
*
* - symlinks
* - node_modules
* - do not contain a package.json
* - do not have a typings property in package.json
* - do not have an appropriate m... | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
FunctionDeclaration | /**
* Look for packages that need to be compiled.
* The function will recurse into folders that start with `@...`, e.g. `@angular/...`.
* Without an argument it starts at `node_modules`.
*/
function findPackagesToCompile(folder: string = 'node_modules'): string[] {
const fullPath = path.resolve(folder);
const p... | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
FunctionDeclaration |
function recursiveDirTest(dir: string, test: (dir: string) => boolean): boolean {
return test(dir) || readdirSync(dir).some(segment => {
const fullPath = path.join(dir, segment);
return lstatSync(fullPath).isDirectory() && recursiveDirTest(fullPath, test);
});
} | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
packagePath => {
formats.forEach(format => {
// TODO: remove before flight
console.warn(`Compiling ${packagePath} : ${format}`);
transformer.transform(packagePath, format, targetPath);
});
} | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
format => {
// TODO: remove before flight
console.warn(`Compiling ${packagePath} : ${format}`);
transformer.transform(packagePath, format, targetPath);
} | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
p => !p.startsWith('.') | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
p => lstatSync(path.join(fullPath, p)).isDirectory() | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
p => {
const packagePath = path.join(fullPath, p);
if (p.startsWith('@')) {
packagesToCompile.push(...findPackagesToCompile(packagePath));
} else {
packagesToCompile.push(packagePath);
}
} | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
path => recursiveDirTest(path, hasMetadataFile) | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
segment => {
const fullPath = path.join(dir, segment);
return lstatSync(fullPath).isDirectory() && recursiveDirTest(fullPath, test);
} | AshKyd/angular | packages/compiler-cli/src/ngcc/src/main.ts | TypeScript |
ArrowFunction |
({ theme }) => theme.orbit.paletteInkLighter | CollierCZ/orbit-components | packages/orbit-components/transforms/__testfixtures__/inkLighter.input.tsx | TypeScript |
ArrowFunction |
({ theme }) => css`
color: ${theme.orbit.paletteInkLighter};
` | CollierCZ/orbit-components | packages/orbit-components/transforms/__testfixtures__/inkLighter.input.tsx | TypeScript |
ArrowFunction |
() => {
const theme = useTheme();
return <div>{theme.orbit.paletteInkLighter}</div>;
} | CollierCZ/orbit-components | packages/orbit-components/transforms/__testfixtures__/inkLighter.input.tsx | TypeScript |
ClassDeclaration |
export class CountryMapper {
public static toAttrs(obj: any) {
const attrs: CountryAggregateAttributes = {
name: obj.name,
nameEn: obj.nameEn,
sovereignId: obj.sovereignId,
population: CountryPopulation.create(obj.population),
geography: CountryGeography.create(obj.geography),
}... | bkegley/luminate | packages/backend/api/src/infra/mappers/CountryMapper.ts | TypeScript |
MethodDeclaration |
public static toAttrs(obj: any) {
const attrs: CountryAggregateAttributes = {
name: obj.name,
nameEn: obj.nameEn,
sovereignId: obj.sovereignId,
population: CountryPopulation.create(obj.population),
geography: CountryGeography.create(obj.geography),
}
return attrs
} | bkegley/luminate | packages/backend/api/src/infra/mappers/CountryMapper.ts | TypeScript |
MethodDeclaration |
public static toDomain(obj: any) {
const id = obj.id || obj._id
const attrs = CountryMapper.toAttrs(obj)
const country = CountryAggregate.create(attrs, id ? EntityId.create(id) : null)
return country
} | bkegley/luminate | packages/backend/api/src/infra/mappers/CountryMapper.ts | TypeScript |
MethodDeclaration |
public static toPersistence(country: CountryAggregate) {
return {
id: country.getEntityId().toString(),
name: country.name,
}
} | bkegley/luminate | packages/backend/api/src/infra/mappers/CountryMapper.ts | TypeScript |
MethodDeclaration |
public static toDTO(country: CountryAggregate): ICountryDTO {
return {
id: country.getEntityId().toString(),
name: country.name,
nameEn: country.nameEn,
sovereignId: country.sovereignId,
population: country.population
? {
estimate: country.population.estimate,
... | bkegley/luminate | packages/backend/api/src/infra/mappers/CountryMapper.ts | TypeScript |
ArrowFunction |
() => NbCellIrisAnalyticsComponent | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
ArrowFunction |
(observer) => {
const interlvaId = setInterval(() => {
if (this.iframe) {
clearInterval(interlvaId);
observer.next(this.iframe);
observer.complete();
}
}, 100);
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
ArrowFunction |
() => {
if (this.iframe) {
clearInterval(interlvaId);
observer.next(this.iframe);
observer.complete();
}
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
ArrowFunction |
iframe => {
iframe.nativeElement.src = this._value.content;
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-nb-cell-iris-analytics',
templateUrl: './nb-cell-iris-analytics.component.html',
styleUrls: ['./nb-cell-iris-analytics.component.scss'],
providers: [CUSTOM_VALUE_ACCESSOR]
})
export class NbCellIrisAnalyticsComponent extends NbCellComponent implements OnInit {
@ViewChild('iframe'... | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
MethodDeclaration |
getIFrame(): Observable<ElementRef> {
return Observable.create((observer) => {
const interlvaId = setInterval(() => {
if (this.iframe) {
clearInterval(interlvaId);
observer.next(this.iframe);
observer.complete();
}
}, 100);
});
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
MethodDeclaration |
writeValue(obj: any): void {
super.writeValue(obj);
this.getIFrame().subscribe(iframe => {
iframe.nativeElement.src = this._value.content;
});
} | jrpereirajr/iris-analytics-notebook | frontend/src/app/notebook/cell/nb-cell-iris-analytics/nb-cell-iris-analytics.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.