type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
ArrowFunction |
(options?: DbInfoOptions) =>
post<Array<DbInfo>, DbInfoOptions>(
`${uri}/_dbs_info`,
withCredentials(options || {}, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: ReplicateOptions) =>
post<Array<Replication>, ReplicateOptions>(
`${uri}/_replicate`,
withCredentials(options || {}, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const { read, create } = resource(`${uri}/_cluster_setup`, auth);
return {
read: (options: ClusterSetupStatusOptions) => read(options),
create: (options: ClusterSetupOptions) => create(options),
};
} | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options: ClusterSetupStatusOptions) => read(options) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options: ClusterSetupOptions) => create(options) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<any, Empty>(`${uri}/_membership`, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const schedulerUri = `${uri}/_scheduler`;
return {
jobs: (options?: SchedulerJobOptions) =>
get<SchedulerJobResult, SchedulerJobOptions>(
`${schedulerUri}/_jobs`,
withCredentials(options || {}, auth),
),
docs: (options?: SchedulerDocOptions) => {
... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: SchedulerJobOptions) =>
get<SchedulerJobResult, SchedulerJobOptions>(
`${schedulerUri}/_jobs`,
withCredentials(options || {}, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options?: SchedulerDocOptions) => {
const { replicator, id, ...rest } = options || {};
return get<SchedulerDocResult, SchedulerDocOptions>(
appendPath(`${schedulerUri}/_docs`, [replicator, id]),
withCredentials(rest || {}, auth),
);
} | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options: SearchAnalyzeOptions) =>
post<SearchAnalyzeResult, SearchAnalyzeOptions>(
`${uri}/_search_analyze`,
withCredentials(options, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<{ status?: 'ok' }, Empty>(`${uri}/_up`, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const reshardUri = `${uri}/_reshard`;
return {
read: () => get(reshardUri, withCredentials({}, auth)),
state: () => {
const { read, create: update } = resource(`${reshardUri}/state`, auth);
return {
read,
update: (options) =>
update({ method:... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => get(reshardUri, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const { read, create: update } = resource(`${reshardUri}/state`, auth);
return {
read,
update: (options) =>
update({ method: RequestMethod.Put, ...options }),
};
} | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options) =>
update({ method: RequestMethod.Put, ...options }) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(id?: DocId) => {
const { read, create, destroy } = idResource<SchedulerJob>(
`${reshardUri}/jobs`,
auth,
id,
);
return {
read,
create: (options) =>
create({ method: RequestMethod.Post, ...options }),
destroy,
st... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options) =>
create({ method: RequestMethod.Post, ...options }) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const { read, create: update } = resource(
`${reshardUri}/jobs/${id}/state`,
);
return {
read,
update: (options) =>
update({ method: RequestMethod.Put, ...options }),
};
} | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options) =>
update({ method: RequestMethod.Put, ...options }) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(name: string = '_local') => {
const nodeUri = `${uri}/_node/${name}`;
return {
read: () =>
get<{ name: string }, Empty>(nodeUri, withCredentials({}, auth)),
stats: (options: NodeStatOptions) =>
get<any, NodeStatOptions>(
`${nodeUri}/_stats/${options.group}/${options.metri... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<{ name: string }, Empty>(nodeUri, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options: NodeStatOptions) =>
get<any, NodeStatOptions>(
`${nodeUri}/_stats/${options.group}/${options.metric}`,
withCredentials(options, auth),
) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<any, Empty>(`${nodeUri}/_system`, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => {
const configUri = `${nodeUri}/_config`;
return {
read: () => get<any, Empty>(configUri, withCredentials({}, auth)),
reload: () =>
post<any, Empty>(`${configUri}/_reload`, withCredentials({}, auth)),
section: (section: string) => {
const sect... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() => get<any, Empty>(configUri, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
post<any, Empty>(`${configUri}/_reload`, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(section: string) => {
const sectionUri = `${configUri}/${section}`;
return {
read: () =>
get<any, Empty>(sectionUri, withCredentials({}, auth)),
key: (key: string) => {
const { read, create: update, destroy } = resource(
... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
() =>
get<any, Empty>(sectionUri, withCredentials({}, auth)) | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(key: string) => {
const { read, create: update, destroy } = resource(
`${sectionUri}/${key}`,
auth,
);
return {
read,
update: (options: NodeConfigUpdateOptions) =>
update({ metho... | bmartel/sauxfas | src/server.ts | TypeScript |
ArrowFunction |
(options: NodeConfigUpdateOptions) =>
update({ method: RequestMethod.Put, ...options }) | bmartel/sauxfas | src/server.ts | TypeScript |
InterfaceDeclaration |
export interface ServerOperations {
read: Get;
uuids: Get;
replicate: Post;
activeTasks: Get;
allDbs: Get;
dbUpdates: Get;
dbsInfo: Post;
clusterSetup: () => {
read: Get<ClusterSetupState, ClusterSetupStatusOptions>;
create: Post<ClusterSetup>;
};
membership: Get;
scheduler: () => {
j... | bmartel/sauxfas | src/server.ts | TypeScript |
ClassDeclaration |
export class BarSeriesSpecComponent extends PureComponent<BarSpecProps> {
static defaultProps: Partial<BarSpecProps> = {
seriesType: 'bar',
groupId: getGroupId('__global__'),
xScaleType: ScaleType.Ordinal,
yScaleType: ScaleType.Linear,
xAccessor: 'x',
yAccessors: ['y'],
yScaleToDataExtent... | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
TypeAliasDeclaration |
type BarSpecProps = SpecProps & BarSeriesSpec; | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
const { chartStore, children, ...config } = this.props;
chartStore!.addSeriesSpec({ ...config });
} | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
MethodDeclaration |
componentDidUpdate(prevProps: BarSpecProps) {
const { chartStore, children, ...config } = this.props;
chartStore!.addSeriesSpec({ ...config });
if (prevProps.id !== this.props.id) {
chartStore!.removeSeriesSpec(prevProps.id);
}
} | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
MethodDeclaration |
componentWillUnmount() {
const { chartStore, id } = this.props;
chartStore!.removeSeriesSpec(id);
} | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
MethodDeclaration |
render() {
return null;
} | monfera/elastic-charts | src/chart_types/xy_chart/specs/bar_series.tsx | TypeScript |
InterfaceDeclaration | /// <reference path="../3rdparty/node.d.ts" />
// Test that including node doesn't break things (as it has before).
interface JustSoFileIsntEmpty {
} | ludamad/LocusTypeScript | cts_tests/ctsEcoop2015/node_include.ts | TypeScript |
FunctionDeclaration |
function testData(): ArrayKeyTrie<string> {
const trie = new ArrayKeyTrie<string>();
for (const kvPair of TEST_ITEMS) {
trie.set(kvPair[0], kvPair[1]);
}
return trie;
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
(key: number[], value: string) => {
test(`insert/get value ${value}`, done => {
const data = testData();
expect(data.get(key)).toBe(value);
done();
});
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.get(key)).toBe(value);
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.getPrefix([1, 4, 5]).value).toBe(undefined);
expect(data.getPrefix([1, 4, 5]).length).toBe(3);
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.get([3])).toBe(undefined);
expect(data.get([1, 3])).toBe(undefined);
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.get([2, 3])).toBe("key with two elements");
data.delete([2, 3]);
expect(data.get([2, 3])).toBe(undefined);
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.get([1, 4])).toBe("key with overlapping elements");
expect(data.get([1, 4, 5, 6, 7, 8])).toBe("long key");
data.delete([1, 4]);
expect(data.get([1, 4])).toBe(undefined);
expect(data.get([1, 4, 5, 6, 7, 8])).toBe("long key");
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
expect(data.get([1, 4])).toBe("key with overlapping elements");
expect(data.get([1, 4, 5, 6, 7, 8])).toBe("long key");
data.delete([1, 4, 5, 6, 7, 8]);
expect(data.get([1, 4])).toBe("key with overlapping elements");
expect(data.get([1, 4, 5, 6, 7, 8])).toBe(undefined);
... | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
ArrowFunction |
done => {
const data = testData();
const valuesSet = new Set(data.values());
expect(valuesSet.has("first")).toBe(true);
expect(valuesSet.has("key with two elements")).toBe(true);
expect(valuesSet.has("key with overlapping elements")).toBe(true);
expect(valuesSet.has("long key")).toBe(true);
done();
} | 81Denton/extraterm | packages/extraterm-data-structures/src/ArrayKeyTrie.jest.ts | TypeScript |
EnumDeclaration |
export enum Source {
TV,
UNKNOWN,
DVD,
WEBDL,
BLURAY
} | tomreinartz90/movieMaster | src/models/Source.enum.ts | TypeScript |
ClassDeclaration |
@Module({
imports: [UsersModule, PassportModule],
providers: [AuthService, LocalStrategy],
controllers: [AuthController]
})
export class AuthModule {} | pkarw/OpenMercato | apps/api/src/auth/auth.module.ts | TypeScript |
ArrowFunction |
() => {
return (dispatch: Dispatch<IManifestUpdateAction>, getState: Function) => {
instance
.post('/get/manifests', {
sourceDirectory: getState().directoriesState.currentSourceDirectory
})
.then((response) => {
if (response.status === 200) {
dispatch({
type: ManifestsActionType.UPDATE_M... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(dispatch: Dispatch<IManifestUpdateAction>, getState: Function) => {
instance
.post('/get/manifests', {
sourceDirectory: getState().directoriesState.currentSourceDirectory
})
.then((response) => {
if (response.status === 200) {
dispatch({
type: ManifestsActionType.UPDATE_MANIFESTS,
... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(response) => {
if (response.status === 200) {
dispatch({
type: ManifestsActionType.UPDATE_MANIFESTS,
manifests: response.data
});
} else {
dispatch({
type: ManifestsActionType.UPDATE_MANIFESTS,
manifests: getState()
});
}
} | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(err) => {
console.log(err);
} | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
() => {
return (dispatch: Dispatch, getState: Function) => {
instance
.post('/commit', {
sourceDirectory: getState().directoriesState.currentSourceDirectory
})
.then((response) => {
if (response.status === 200) {
getAllManifests()(dispatch, getState);
}
})
.catch((err) => {
conso... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(dispatch: Dispatch, getState: Function) => {
instance
.post('/commit', {
sourceDirectory: getState().directoriesState.currentSourceDirectory
})
.then((response) => {
if (response.status === 200) {
getAllManifests()(dispatch, getState);
}
})
.catch((err) => {
console.log(err);
... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(response) => {
if (response.status === 200) {
getAllManifests()(dispatch, getState);
}
} | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
() => {
return (dispatch: Dispatch, getState: Function) => {
instance
.post('/checkin', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
targetDirectory: getState().directoriesState.currentTargetDirectory
})
.then((response) => {
if (response.status === 200) {
getAllM... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(dispatch: Dispatch, getState: Function) => {
instance
.post('/checkin', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
targetDirectory: getState().directoriesState.currentTargetDirectory
})
.then((response) => {
if (response.status === 200) {
getAllManifests()(dispa... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
() => {
return (dispatch: Dispatch, getState: Function) => {
instance
.post('/checkout', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
targetDirectory: getState().directoriesState.currentTargetDirectory
})
.then((response) => {
if (response.status === 200) {
getAll... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(dispatch: Dispatch, getState: Function) => {
instance
.post('/checkout', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
targetDirectory: getState().directoriesState.currentTargetDirectory
})
.then((response) => {
if (response.status === 200) {
getAllManifests()(disp... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(id: string, value: string | string[]) => {
return (dispatch: Dispatch, getState: Function) => {
instance
.post('/update', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
id: id,
field: 'tag',
value: value
})
.then((response) => {
if (response.status === 200) {
... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ArrowFunction |
(dispatch: Dispatch, getState: Function) => {
instance
.post('/update', {
sourceDirectory: getState().directoriesState.currentSourceDirectory,
id: id,
field: 'tag',
value: value
})
.then((response) => {
if (response.status === 200) {
getAllManifests()(dispatch, getState);
}
}... | sotheanith/CECS-543-VCS | src/statesManagement/manifestsState/ManifestsActions.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'app-comp-142',
templateUrl: './comp-142.component.html',
styleUrls: ['./comp-142.component.css']
})
export class Comp142Component implements OnInit {
constructor(private _service: Service142Service) { }
ngOnInit() {
}
} | angular/angular-cli-stress-test | src/app/components/comp-142/comp-142.component.ts | TypeScript |
ArrowFunction |
() => {
if (bufferFileList.length === 0) return;
console.log(bufferFileList)
seedFiles(bufferFileList);
} | STDSuperman/WebRTC-Explore | packages/web-torrent-render/src/pages/seed-files/ant-upload/index.tsx | TypeScript |
ArrowFunction |
() => {
return (
<Dragger {...props}>
<p className="ant-upload-drag-icon">
<InboxOutlined />
</p>
<p className="ant-upload-text">Click or drag file to this area to upload</p>
<p className="ant-upload-hint">
Support for a single or bulk upload. Strictly prohibit... | STDSuperman/WebRTC-Explore | packages/web-torrent-render/src/pages/seed-files/ant-upload/index.tsx | TypeScript |
MethodDeclaration |
beforeUpload(info) {
bufferFileList.push(info);
fileListHandler();
return false;
} | STDSuperman/WebRTC-Explore | packages/web-torrent-render/src/pages/seed-files/ant-upload/index.tsx | TypeScript |
ArrowFunction |
(e: MouseEvent) => this.handleOver(e) | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
ArrowFunction |
(e: MouseEvent) => this.handleLeave(e) | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
ClassDeclaration |
@Component({
selector: 'ngx-emoji',
template: `
<span *ngIf="isVisible"
#emojiSpan
(click)="handleClick($event)"
[title]="title"
class="emoji-mart-emoji"
[class.emoji-mart-emoji-native]="isNative"
[class.emoji-mart-emoji-custom]="custom">
<span [ngStyle]="style">
<ng-template [n... | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
InterfaceDeclaration |
export interface Emoji {
/** Renders the native unicode emoji */
isNative: boolean;
forceSize: boolean;
tooltip: boolean;
skin: 1 | 2 | 3 | 4 | 5 | 6;
sheetSize: 16 | 20 | 32 | 64;
set:
| 'apple'
| 'google'
| 'twitter'
| 'emojione'
| 'messenger'
| 'facebook'
| '';
size: numb... | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
InterfaceDeclaration |
export interface EmojiEvent {
emoji: EmojiData;
$event: Event;
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
ngAfterViewInit() {
if (this.emojiSpan! && this.emojiSpan!.nativeElement && this.emitEmojiMouseOverEvents) {
this.emojiSpan!.nativeElement.addEventListener('mouseenter', (e: MouseEvent) => this.handleOver(e));
this.emojiSpan!.nativeElement.addEventListener('mouseleave', (e: MouseEvent) => this.handleLe... | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
ngOnChanges() {
if (!this.emoji) {
return (this.isVisible = false);
}
const data = this.getData();
if (!data) {
return (this.isVisible = false);
}
// const children = this.children;
this.unified = data.native || null;
if (data.custom) {
this.custom = data.custom;
}... | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
getData() {
return this.emojiService.getData(this.emoji, this.skin, this.set);
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
getSanitizedData(): EmojiData {
return this.emojiService.getSanitizedData(this.emoji, this.skin, this.set) as EmojiData;
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
handleClick($event: Event, touch = false) {
const emoji = this.getSanitizedData();
this.emojiClick.emit({ emoji, $event });
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
handleOver($event: Event) {
const emoji = this.getSanitizedData();
this.emojiOver.emit({ emoji, $event });
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
MethodDeclaration |
handleLeave($event: Event) {
const emoji = this.getSanitizedData();
this.emojiLeave.emit({ emoji, $event });
} | floAtEbcont/ngx-emoji-mart | src/lib/emoji/emoji.component.ts | TypeScript |
FunctionDeclaration |
export function createStoreWithNullParams<TStore>(ctor: CtorWithArgs<TStore>): TStore {
return new ctor();
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
a => a[this.actionName] | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
() => actionMock.object | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
a => a.addListener(It.is(param => param instanceof Function)) | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
param => param instanceof Function | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
listener => (this.listener = listener) | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
(theStore, args) => {} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
l => l(this.isSameStoreTypeMatcher(store), It.isAny()) | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ArrowFunction |
actualStore => expectedStore.getId() === actualStore.getId() | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
ClassDeclaration |
export class StoreTester<TStoreData, TActions> {
private actionName: string;
private actionParam: any;
private listener: Function;
private actions: DefaultConstructor<TActions>;
private storeFactory: (actions) => BaseStoreImpl<TStoreData>;
private postListenerMock: IMock<any>;
constructor(... | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
TypeAliasDeclaration |
export type CtorWithArgs<T> = {
new (...ctorArgs: any[]): T;
prototype: Object;
}; | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
public withActionParam(param: any): StoreTester<TStoreData, TActions> {
this.actionParam = param;
return this;
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
public withPostListenerMock(mock: IMock<any>): StoreTester<TStoreData, TActions> {
this.postListenerMock = mock;
return this;
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
public testListenerToNeverBeCalled(initial: TStoreData, expected: TStoreData): void {
this.testListenerToBeCalled(initial, expected, Times.never());
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
public testListenerToBeCalledOnce(initial: TStoreData, expected: TStoreData): void {
this.testListenerToBeCalled(initial, expected, Times.once());
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
public testListenerToBeCalled(initial: TStoreData, expected: TStoreData, times: Times): void {
const actionsMock = this.createActionsMock();
const testObject = this.storeFactory(actionsMock.object);
testObject.initialize(initial);
const listenerMock = this.createChangeListener(testOb... | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
private verifyPostListenerMock(): void {
if (this.postListenerMock) {
this.postListenerMock.verifyAll();
}
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
private createActionsMock(): IMock<TActions> {
const actionMock = this.createActionMock();
const actionsMock = Mock.ofType(this.actions, MockBehavior.Loose);
actionsMock.setup(a => a[this.actionName]).returns(() => actionMock.object);
return actionsMock;
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
private createActionMock(): IMock<Action<{}>> {
const actionMock = Mock.ofType(Action);
actionMock.setup(a => a.addListener(It.is(param => param instanceof Function))).callback(listener => (this.listener = listener));
return actionMock;
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
private createChangeListener(store: BaseStore<TStoreData>, times: Times): IMock<(store, args) => void> {
const listenerMock = Mock.ofInstance((theStore, args) => {});
listenerMock.setup(l => l(this.isSameStoreTypeMatcher(store), It.isAny())).verifiable(times);
return listenerMock;
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
MethodDeclaration |
private isSameStoreTypeMatcher(expectedStore: BaseStore<TStoreData>): BaseStore<TStoreData> {
return It.is(actualStore => expectedStore.getId() === actualStore.getId());
} | catherinephamiss/accessibility-insights-web | src/tests/unit/common/store-tester.ts | TypeScript |
EnumDeclaration | /**
* Generated from ai.giskard.domain.ml.ModelLanguage
*/
export enum ModelLanguage {
PYTHON = 'PYTHON'
} | Giskard-AI/giskard | giskard-frontend/src/generated-sources/ai/giskard/domain/ml/model-language.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.