type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(
externalServicesCount: number,
userRepoCount: number
): void => {
this.setState({
hasUserAddedExternalServices: externalServicesCount > 0,
hasUserAddedRepositories: userRepoCount > 0,
})
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
(publicReposCount: number): void => {
this.setState({
hasUserSyncedPublicRepositories: publicReposCount > 0,
})
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
(): boolean =>
this.state.hasUserAddedRepositories || this.state.hasUserSyncedPublicRepositories | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
(): string | undefined =>
this.state.showSearchContext ? this.state.selectedSearchContextSpec : undefined | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
(spec: string): void => {
const { defaultSearchContextSpec } = this.state
this.subscriptions.add(
getAvailableSearchContextSpecOrDefault({ spec, defaultSpec: defaultSearchContextSpec }).subscribe(
availableSearchContextSpecOrDefault => {
this.setState({ s... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
availableSearchContextSpecOrDefault => {
this.setState({ selectedSearchContextSpec: availableSearchContextSpecOrDefault })
localStorage.setItem(LAST_SEARCH_CONTEXT_KEY, availableSearchContextSpecOrDefault)
this.setWorkspaceSearchContext(availableSearchContex... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
ArrowFunction |
error => {
console.error('Error sending search context to extensions', error)
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
InterfaceDeclaration |
export interface SourcegraphWebAppProps extends CodeIntelligenceProps, BatchChangesProps, KeyboardShortcutsProps {
extensionAreaRoutes: readonly ExtensionAreaRoute[]
extensionAreaHeaderNavItems: readonly ExtensionAreaHeaderNavItem[]
extensionsAreaRoutes: readonly ExtensionsAreaRoute[]
extensionsAreaHea... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
InterfaceDeclaration |
interface SourcegraphWebAppState extends SettingsCascadeProps {
error?: Error
/** The currently authenticated user (or null if the viewer is anonymous). */
authenticatedUser?: AuthenticatedUser | null
viewerSubject: LayoutProps['viewerSubject']
/** The user's preference for the theme (light, dar... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
MethodDeclaration | /** Returns whether Sourcegraph should be in light theme */
private isLightTheme(): boolean {
return this.state.themePreference === 'system'
? this.state.systemIsLightTheme
: this.state.themePreference === 'light'
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
MethodDeclaration |
public componentDidMount(): void {
updateUserSessionStores()
document.documentElement.classList.add('theme')
this.subscriptions.add(
combineLatest([from(this.platformContext.settings), authenticatedUser.pipe(startWith(null))]).subscribe(
([settingsCascade, authenti... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
MethodDeclaration |
public componentWillUnmount(): void {
this.subscriptions.unsubscribe()
document.documentElement.classList.remove('theme', 'theme-light', 'theme-dark')
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
MethodDeclaration |
public componentDidUpdate(): void {
localStorage.setItem(LIGHT_THEME_LOCAL_STORAGE_KEY, this.state.themePreference)
document.documentElement.classList.toggle('theme-light', this.isLightTheme())
document.documentElement.classList.toggle('theme-dark', !this.isLightTheme())
} | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
MethodDeclaration |
public render(): React.ReactFragment | null {
if (window.pageError && window.pageError.statusCode !== 404) {
const statusCode = window.pageError.statusCode
const statusText = window.pageError.statusText
const errorMessage = window.pageError.error
const errorID = ... | orijtech/sourcegraph | client/web/src/SourcegraphWebApp.tsx | TypeScript |
FunctionDeclaration |
export async function getHealthOverview(): Promise<ServiceHealthIssues> {
try {
let serviceHealthIssues: ServiceHealthIssues =
await MSGraph.Get("/admin/serviceAnnouncement/issues",
"v1.0", ["id,title,service"], [], "isResolved eq false", true);
console.debug("Service hea... | ArijitCloud/sp-dev-fx-aces | samples/PrimaryTextCard-Service-Health/src/adaptiveCardExtensions/serviceHealth.ts | TypeScript |
FunctionDeclaration | //TODO: Add icons for each service
export function getIconForService(servicename: string) {
switch (servicename) {
case "Exchange Online":
return "https://upload.wikimedia.org/wikipedia/commons/e/ea/Microsoft_Exchange_%282019-present%29.svg";
case "Microsoft 365 suite":
retur... | ArijitCloud/sp-dev-fx-aces | samples/PrimaryTextCard-Service-Health/src/adaptiveCardExtensions/serviceHealth.ts | TypeScript |
ClassDeclaration | /**
* <p>Cancels the requested policy generation.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
* import { AccessAnalyzerClient, CancelPolicyGenerationCommand } from "@aws-sdk/client-accessanalyzer"; // ES Modules import
* // const { AccessAnalyzerClient, C... | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
InterfaceDeclaration |
export interface CancelPolicyGenerationCommandInput extends CancelPolicyGenerationRequest {} | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
InterfaceDeclaration |
export interface CancelPolicyGenerationCommandOutput extends CancelPolicyGenerationResponse, __MetadataBearer {} | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
MethodDeclaration | /**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: AccessAnalyzerClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<CancelPolicyGenerationCommandInput, CancelPolicyGenerationCommandOutput> {
this.middlewareStack.... | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
MethodDeclaration |
private serialize(input: CancelPolicyGenerationCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_restJson1CancelPolicyGenerationCommand(input, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<CancelPolicyGenerationCommandOutput> {
return deserializeAws_restJson1CancelPolicyGenerationCommand(output, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-accessanalyzer/commands/CancelPolicyGenerationCommand.ts | TypeScript |
FunctionDeclaration |
export async function getBinaryPath(bin: string) {
const binPath = path.resolve(`./node_modules/.bin/${bin}`);
try {
await accessAsync(binPath, fs.constants.F_OK);
} catch (e) {
throw new Error(`Can't access "${bin}" binary. Please check it has been properly installed`);
}
return binPath;
} | TheHumbleJester/alliage-typescript | src/helpers.ts | TypeScript |
ArrowFunction |
(reply: unknown) => {
if ((this.#pubSubState.subscribing || this.#pubSubState.subscribed) && Array.isArray(reply)) {
switch (reply[0]) {
case 'message':
return RedisCommandsQueue.#emitPubSubMessage(
this.#pubSubListener... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
(err: Error) => this.#shiftWaitingForReply().reject(err) | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const node = new LinkedList.Node<CommandWaitingToBeSent>({
args,
chainId: options?.chainId,
bufferMode,
resolve,
reject,
});
if (options?.signal) {
const listener ... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
() => {
this.#waitingToBeSent.removeNode(node);
node.value.reject(new AbortError());
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
const isSubscribe = command === PubSubSubscribeCommands.SUBSCRIBE || command === PubSubSubscribeCommands.PSUBSCRIBE,
inProgressKey = isSubscribe ? 'subscribing' : 'unsubscribing',
commandArgs: Array<string> = [command];
let channelsCounter... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
() => {
this.#pubSubState[inProgressKey] -= channelsCounter;
this.#pubSubState.subscribed += channelsCounter * (isSubscribe ? 1 : -1);
resolve();
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ArrowFunction |
() => {
this.#pubSubState[inProgressKey] -= channelsCounter;
reject();
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
InterfaceDeclaration |
export interface QueueCommandOptions {
asap?: boolean;
chainId?: symbol;
signal?: any; // TODO: `AbortSignal` type is incorrect
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
InterfaceDeclaration |
interface CommandWaitingToBeSent extends CommandWaitingForReply {
args: Array<string | Buffer>;
chainId?: symbol;
abort?: {
signal: any; // TODO: `AbortSignal` type is incorrect
listener(): void;
};
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
InterfaceDeclaration |
interface CommandWaitingForReply {
resolve(reply?: any): void;
reject(err: Error): void;
channelsCounter?: number;
bufferMode?: boolean;
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
EnumDeclaration |
export enum PubSubSubscribeCommands {
SUBSCRIBE = 'SUBSCRIBE',
PSUBSCRIBE = 'PSUBSCRIBE'
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
EnumDeclaration |
export enum PubSubUnsubscribeCommands {
UNSUBSCRIBE = 'UNSUBSCRIBE',
PUNSUBSCRIBE = 'PUNSUBSCRIBE'
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
TypeAliasDeclaration |
export type PubSubListener = (message: string, channel: string) => unknown; | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
TypeAliasDeclaration |
export type PubSubListenersMap = Map<string, Set<PubSubListener>>; | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
static #flushQueue<T extends CommandWaitingForReply>(queue: LinkedList<T>, err: Error): void {
while (queue.length) {
queue.shift()!.reject(err);
}
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
static #emitPubSubMessage(listeners: Set<PubSubListener>, message: string, channel: string): void {
for (const listener of listeners) {
listener(message, channel);
}
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
addCommand<T = RedisCommandRawReply>(args: Array<string | Buffer>, options?: QueueCommandOptions, bufferMode?: boolean): Promise<T> {
if (this.#pubSubState.subscribing || this.#pubSubState.subscribed) {
return Promise.reject(new Error('Cannot send commands in PubSub mode'));
} else if (this... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
subscribe(command: PubSubSubscribeCommands, channels: string | Array<string>, listener: PubSubListener): Promise<void> {
const channelsToSubscribe: Array<string> = [],
listeners = command === PubSubSubscribeCommands.SUBSCRIBE ? this.#pubSubListeners.channels : this.#pubSubListeners.patterns;
... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
unsubscribe(command: PubSubUnsubscribeCommands, channels?: string | Array<string>, listener?: PubSubListener): Promise<void> {
const listeners = command === PubSubUnsubscribeCommands.UNSUBSCRIBE ? this.#pubSubListeners.channels : this.#pubSubListeners.patterns;
if (!channels) {
const size =... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
#pushPubSubCommand(command: PubSubSubscribeCommands | PubSubUnsubscribeCommands, channels: number | Array<string>): Promise<void> {
return new Promise((resolve, reject) => {
const isSubscribe = command === PubSubSubscribeCommands.SUBSCRIBE || command === PubSubSubscribeCommands.PSUBSCRIBE,
... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
resubscribe(): Promise<any> | undefined {
if (!this.#pubSubState.subscribed && !this.#pubSubState.subscribing) {
return;
}
this.#pubSubState.subscribed = this.#pubSubState.subscribing = 0;
// TODO: acl error on one channel/pattern will reject the whole command
retu... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
getCommandToSend(): Array<string | Buffer> | undefined {
const toSend = this.#waitingToBeSent.shift();
if (toSend) {
this.#waitingForReply.push({
resolve: toSend.resolve,
reject: toSend.reject,
channelsCounter: toSend.channelsCounter,
... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
parseResponse(data: Buffer): void {
this.#parser.setReturnBuffers(!!this.#waitingForReply.head?.value.bufferMode);
this.#parser.execute(data);
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
#shiftWaitingForReply(): CommandWaitingForReply {
if (!this.#waitingForReply.length) {
throw new Error('Got an unexpected reply from Redis');
}
return this.#waitingForReply.shift()!;
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
flushWaitingForReply(err: Error): void {
RedisCommandsQueue.#flushQueue(this.#waitingForReply, err);
if (!this.#chainInExecution) {
return;
}
while (this.#waitingToBeSent.head?.value.chainId === this.#chainInExecution) {
this.#waitingToBeSent.shift();
}... | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
MethodDeclaration |
flushAll(err: Error): void {
RedisCommandsQueue.#flushQueue(this.#waitingForReply, err);
RedisCommandsQueue.#flushQueue(this.#waitingToBeSent, err);
} | chayim/node-redis | lib/client/commands-queue.ts | TypeScript |
ClassDeclaration | //react component
export default class Directions extends AnimationSubsection {
protected subsection = 'directions' as const;
protected values: Direction[] = directions;
protected isChecked(direction: Direction) {
return this.props.options.directions.includes(direction);
}
protected togg... | johnnytisdale/random-css | src/ts/Form/Css/Animation/Directions.tsx | TypeScript |
MethodDeclaration |
protected isChecked(direction: Direction) {
return this.props.options.directions.includes(direction);
} | johnnytisdale/random-css | src/ts/Form/Css/Animation/Directions.tsx | TypeScript |
MethodDeclaration |
protected toggle(direction: Direction) {
let options = this.props.options.directions.map(x => x);
if (this.isChecked(direction)) {
options.splice(options.indexOf(direction), 1);
} else {
options.push(direction);
}
this.props.changeValue('directions', opti... | johnnytisdale/random-css | src/ts/Form/Css/Animation/Directions.tsx | TypeScript |
ArrowFunction |
() => {
test
.nock('https://buildpack-registry.heroku.com', (api: nock.Scope) => {
api
.get('/buildpacks/heroku%2Fruby')
.reply(200, Fixture.buildpack({
name: 'ruby',
source: {
type: 'github',
owner: 'heroku',
repo: 'heroku-buildpack-ruby',
},
}))
.get(... | JETCryptoUK/cli | packages/buildpacks/test/commands/buildpacks/info.test.ts | TypeScript |
ArrowFunction |
(api: nock.Scope) => {
api
.get('/buildpacks/heroku%2Fruby')
.reply(200, Fixture.buildpack({
name: 'ruby',
source: {
type: 'github',
owner: 'heroku',
repo: 'heroku-buildpack-ruby',
},
}))
.get('/buildpacks/heroku%2Fruby/revisions')
.reply(200, [Fixture.... | JETCryptoUK/cli | packages/buildpacks/test/commands/buildpacks/info.test.ts | TypeScript |
ArrowFunction |
ctx => {
expect(ctx.stdout).to.contain('=== heroku/ruby')
expect(ctx.stdout).to.contain('languages')
expect(ctx.stdout).to.match(/source:\s+https:\/\/github\.com\/heroku\/heroku-buildpack-ruby/)
} | JETCryptoUK/cli | packages/buildpacks/test/commands/buildpacks/info.test.ts | TypeScript |
ArrowFunction |
(api: nock.Scope) => {
api
.get('/buildpacks/hone%2Ftest')
.reply(404, {})
} | JETCryptoUK/cli | packages/buildpacks/test/commands/buildpacks/info.test.ts | TypeScript |
ArrowFunction |
(api: nock.Scope) => {
api
.get('/buildpacks/hone%2Ftest')
.reply(500, 'some error')
} | JETCryptoUK/cli | packages/buildpacks/test/commands/buildpacks/info.test.ts | TypeScript |
MethodDeclaration | /**
* Prepares data object for video events tracking
*/
getEventData(videoData: VideoData): VideoEventData {
const now: Date = new Date();
const slot: AdSlot = slotService.get(videoData.position);
if (!slot) {
throw new Error(`Slot ${videoData.position} is not registered.`);
}
return {
ad_error_co... | Wikia/ad-engine | src/ad-products/tracking/video/video-event-data-provider.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/Recommed/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/MusicList/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/AanchrRadio/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/Top/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/Singer/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => import('@/views/Find/pages/Latest/index.vue') | hiover/NotesMusic | src/routers/find.ts | TypeScript |
ArrowFunction |
() => ({
panelActions: {
justifyContent: "flex-start"
},
failureMessage: {
backgroundColor: "#EDEDED",
overflowX: "auto",
fontSize: "0.9em"
}
}) | aaronzirbes/projektor | ui/src/TestCase/TestCaseFailurePanel.tsx | TypeScript |
ArrowFunction |
({
testCase,
publicId,
showFullFailure
}: TestCaseFailurePanelProps) => {
const classes = useStyles({});
const testCaseIdentifier = `${testCase.testSuiteIdx}-${testCase.idx}`;
return (
<ExpansionPanel
defaultExpanded
data-testid={`test-case-summary-${testCaseIdentifier}`}
>
<Expa... | aaronzirbes/projektor | ui/src/TestCase/TestCaseFailurePanel.tsx | TypeScript |
InterfaceDeclaration |
interface TestCaseFailurePanelProps {
testCase: TestCase;
publicId: string;
showFullFailure?: boolean;
} | aaronzirbes/projektor | ui/src/TestCase/TestCaseFailurePanel.tsx | TypeScript |
FunctionDeclaration |
export function TelemetryPlugin(vue: typeof _Vue): void {
const telemetry = new Telemetry();
Object.defineProperty(vue, '$telemetry', {
get() { return telemetry; },
});
Object.defineProperty(vue.prototype, '$telemetry', {
get() { return telemetry; },
});
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ArrowFunction |
(node: INodeCreateElement) => node.key | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ArrowFunction |
(t: any) => { // tslint:disable-line:no-any
return (...args: any[]) => { // tslint:disable-line:no-any
const r = Array.prototype.slice.call(args);
r.unshift(t);
this.telemetry.push(r);
return this.telemetry;
};
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ArrowFunction |
(...args: any[]) => { // tslint:disable-line:no-any
const r = Array.prototype.slice.call(args);
r.unshift(t);
this.telemetry.push(r);
return this.telemetry;
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ArrowFunction |
() => {
const r = document.createElement("script");
r.type = "text/javascript";
r.async = !0;
r.src = "https://cdn.rudderlabs.com/v1/rudder-analytics.min.js";
const a = document.getElementsByTagName("script")[0];
if(a && a.parentNode) {
a.parentNode.insertBefore(r, a);
}
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ClassDeclaration |
class Telemetry {
private get telemetry() {
// @ts-ignore
return window.rudderanalytics;
}
private userNodesPanelSession: IUserNodesPanelSession = {
sessionId: '',
data: {
nodeFilter: '',
resultsNodes: [],
filterMode: 'Regular',
},
};
init(options: ITelemetrySettings, instanceId: string) {
... | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
InterfaceDeclaration |
interface Vue {
$telemetry: Telemetry;
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
InterfaceDeclaration |
interface IUserNodesPanelSessionData {
nodeFilter: string;
resultsNodes: string[];
filterMode: string;
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
InterfaceDeclaration |
interface IUserNodesPanelSession {
sessionId: string;
data: IUserNodesPanelSessionData;
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
get() { return telemetry; } | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
init(options: ITelemetrySettings, instanceId: string) {
if (options.enabled && !this.telemetry) {
if(!options.config) {
return;
}
this.loadTelemetryLibrary(options.config.key, options.config.url, { integrations: { All: false }, loadIntegration: false });
this.telemetry.identify(instanceId);
}
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
track(event: string, properties?: IDataObject) {
if (this.telemetry) {
this.telemetry.track(event, properties);
}
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
trackNodesPanel(event: string, properties: IDataObject = {}) {
if (this.telemetry) {
properties.nodes_panel_session_id = this.userNodesPanelSession.sessionId;
switch (event) {
case 'nodeView.createNodeActiveChanged':
if (properties.createNodeActive !== false) {
this.resetNodesPanelSession();
... | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
private resetNodesPanelSession() {
this.userNodesPanelSession.sessionId = `nodes_panel_session_${(new Date()).valueOf()}`;
this.userNodesPanelSession.data = {
nodeFilter: '',
resultsNodes: [],
filterMode: 'All',
};
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
private generateNodesPanelEvent() {
return {
search_string: this.userNodesPanelSession.data.nodeFilter,
results_count: this.userNodesPanelSession.data.resultsNodes.length,
filter_mode: this.userNodesPanelSession.data.filterMode,
nodes_panel_session_id: this.userNodesPanelSession.sessionId,
};
} | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
MethodDeclaration |
private loadTelemetryLibrary(key: string, url: string, options: IDataObject) {
// @ts-ignore
window.rudderanalytics = window.rudderanalytics || [];
this.telemetry.methods = ["load", "page", "track", "identify", "alias", "group", "ready", "reset", "getAnonymousId", "setAnonymousId"];
this.telemetry.factory = (... | 5-stones/n8n | packages/editor-ui/src/plugins/telemetry/index.ts | TypeScript |
ClassDeclaration |
@EntityRepository(Transaction)
export class TransactionRepository extends Repository<Transaction> {
async findWithInstances(
transactionHash?: string,
blockHash?: string,
): Promise<Transaction | null> {
const transaction = await this.findOne({
where: {
hash: transactionHash,
bloc... | nairyl/stronghold | stronghold-rosetta-api/src/repository/TransactionRepository.ts | TypeScript |
MethodDeclaration |
async findWithInstances(
transactionHash?: string,
blockHash?: string,
): Promise<Transaction | null> {
const transaction = await this.findOne({
where: {
hash: transactionHash,
block: { hash: blockHash },
},
relations: FULL_JOINS,
})
return transaction || null
... | nairyl/stronghold | stronghold-rosetta-api/src/repository/TransactionRepository.ts | TypeScript |
MethodDeclaration |
async getWithInstances(transactionHash?: string, blockHash?: string): Promise<Transaction> {
return await this.findOneOrFail({
where: {
hash: transactionHash,
block: { hash: blockHash },
},
relations: FULL_JOINS,
})
} | nairyl/stronghold | stronghold-rosetta-api/src/repository/TransactionRepository.ts | TypeScript |
MethodDeclaration |
async findByHashWithInstances(hash: string, limit: number): Promise<Transaction[]> {
return (
(await this.find({
where: { hash: Like(`%${hash}%`) },
take: limit,
relations: FULL_JOINS,
})) || []
)
} | nairyl/stronghold | stronghold-rosetta-api/src/repository/TransactionRepository.ts | TypeScript |
FunctionDeclaration | /** Returns a list of all available group avatars for the signed-in user. */
export declare function getAvailableAvatars(
http: HttpClient
): Promise<
ServerResponse<{
[key: number]: string;
}>
>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /** Returns a list of all available group themes. */
export declare function getAvailableThemes(http: HttpClient): Promise<ServerResponse<GroupTheme[]>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Gets the state of the user's clan invite preferences for a particular membership
* type - true if they wish to be invited to clans, false otherwise.
*/
export declare function getUserClanInviteSetting(
http: HttpClient,
params: GetUserClanInviteSettingParams
): Promise<ServerResponse<boolean>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Gets groups recommended for you based on the groups to whom those you follow
* belong.
*/
export declare function getRecommendedGroups(
http: HttpClient,
params: GetRecommendedGroupsParams
): Promise<ServerResponse<GroupV2Card[]>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /** Search for Groups. */
export declare function groupSearch(
http: HttpClient,
body: GroupQuery
): Promise<ServerResponse<GroupSearchResponse>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /** Get information about a specific group of the given ID. */
export declare function getGroup(
http: HttpClient,
params: GetGroupParams
): Promise<ServerResponse<GroupResponse>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /** Get information about a specific group with the given name and type. */
export declare function getGroupByName(
http: HttpClient,
params: GetGroupByNameParams
): Promise<ServerResponse<GroupResponse>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Get information about a specific group with the given name and type. The POST
* version.
*/
export declare function getGroupByNameV2(
http: HttpClient,
body: GroupNameSearchRequest
): Promise<ServerResponse<GroupResponse>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /** Gets a list of available optional conversation channels and their settings. */
export declare function getGroupOptionalConversations(
http: HttpClient,
params: GetGroupOptionalConversationsParams
): Promise<ServerResponse<GroupOptionalConversation[]>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Edit an existing group. You must have suitable permissions in the group to
* perform this operation. This latest revision will only edit the fields you pass
* in - pass null for properties you want to leave unaltered.
*/
export declare function editGroup(
http: HttpClient,
params: EditGroupParams,
body:... | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Edit an existing group's clan banner. You must have suitable permissions in the
* group to perform this operation. All fields are required.
*/
export declare function editClanBanner(
http: HttpClient,
params: EditClanBannerParams,
body: ClanBanner
): Promise<ServerResponse<number>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Edit group options only available to a founder. You must have suitable
* permissions in the group to perform this operation.
*/
export declare function editFounderOptions(
http: HttpClient,
params: EditFounderOptionsParams,
body: GroupOptionsEditAction
): Promise<ServerResponse<number>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
FunctionDeclaration | /**
* Add a new optional conversation/chat channel. Requires admin permissions to the
* group.
*/
export declare function addOptionalConversation(
http: HttpClient,
params: AddOptionalConversationParams,
body: GroupOptionalConversationAddRequest
): Promise<ServerResponse<string>>; | bibulle/bungie-api-ts | lib/groupv2/api.d.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.