type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
protected writeIndexedDoodad(value?: IDoodad): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedNPC(): INPC | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedNPC(value?: INPC): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedCorpse(): ICorpse | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedCorpse(value?: ICorpse): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedEntity(): ICreature | INPC | IPlayer | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedEntity(value?: IEntity): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedHuman(): Human | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedHuman(value?: Human): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedItem(): IItem | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedItem(value?: IItem): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedMovementIntent(): IMovementIntent | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedMovementIntent(value?: IMovementIntent): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedItems(): IItem[] | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedItems(value?: IItem[]): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedObject(): any; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedObject(value?: any): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected readIndexedVector2Array(): IVector2[] | undefined; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
MethodDeclaration |
protected writeIndexedVector2Array(value?: IVector2[]): void; | WaywardGameKorean/addContents | mod-reference/definitions/multiplayer/packets/IndexedPacket.d.ts | TypeScript |
FunctionDeclaration |
function getUtilityClasses(ownerState: MenuItemOwnerState) {
const { disabled, focusVisible } = ownerState;
const slots = {
root: ['root', disabled && 'disabled', focusVisible && 'focusVisible'],
};
return composeClasses(slots, getMenuItemUnstyledUtilityClass, {});
} | Starcoder0x/material-ui | packages/mui-base/src/MenuItemUnstyled/MenuItemUnstyled.tsx | TypeScript |
ClassDeclaration |
@Injectable()
export class QuestionService {
constructor(
private questionApi: QuestionApi
){}
getQuestions(){
let filter: LoopBackFilter = {
"include":{
"relation": "answers"
}
}
return this.questionApi.find<Question>(filter)
.toPromise()
}
getQuestion(questionId){
let... | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
getQuestions(){
let filter: LoopBackFilter = {
"include":{
"relation": "answers"
}
}
return this.questionApi.find<Question>(filter)
.toPromise()
} | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
getQuestion(questionId){
let query = {
id: questionId
}
return this.questionApi.find<Question>({where: query})
.toPromise()
} | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
getQuestionsBySlug(slug){
let filter: LoopBackFilter = {
"include":{
"relation": "answers"
},
"where": {
"questionSlug": slug
}
}
return this.questionApi.find<Question>(filter)
.toPromise()
} | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
deleteQuestion(questionId){
return this.questionApi.deleteById<Question>(questionId)
.toPromise()
} | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
updateQuestion(values){
let data = new Question();
data.question = values.question;
data.positiveVotes = values.positiveVotes;
data.negativeVotes = values.negativeVotes;
data.questionSlug = values.categorySlug;
return this.questionApi.updateAttributes<Question>(values.id, data)
.toPromise()... | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
MethodDeclaration |
createQuestion(values){
let data = new Question();
data.question = values.question;
data.questionSlug = values.categorySlug
return this.questionApi.create<Question>(data)
.toPromise()
} | gonzad77/ionic2-loopback-mongo-example-web-app | src/app/services/question.service.ts | TypeScript |
ClassDeclaration | /**
* <p>Put or replace tags on an existing Amazon S3 Storage Lens configuration. For more information about S3 Storage Lens, see
* <a href="https://docs.aws.amazon.com/AmazonS3/latest/dev/storage_lens.html">Assessing your storage
* activity and usage with Amazon S3 Storage Lens </a> in the
* ... | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
InterfaceDeclaration |
export interface PutStorageLensConfigurationTaggingCommandInput extends PutStorageLensConfigurationTaggingRequest {} | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
InterfaceDeclaration |
export interface PutStorageLensConfigurationTaggingCommandOutput
extends PutStorageLensConfigurationTaggingResult,
__MetadataBearer {} | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
MethodDeclaration | /**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: S3ControlClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<PutStorageLensConfigurationTaggingCommandInput, PutStorageLensConfigurationTaggingCommandOutput> {
th... | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
MethodDeclaration |
private serialize(
input: PutStorageLensConfigurationTaggingCommandInput,
context: __SerdeContext
): Promise<__HttpRequest> {
return serializeAws_restXmlPutStorageLensConfigurationTaggingCommand(input, context);
} | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(
output: __HttpResponse,
context: __SerdeContext
): Promise<PutStorageLensConfigurationTaggingCommandOutput> {
return deserializeAws_restXmlPutStorageLensConfigurationTaggingCommand(output, context);
} | Autoskaler/aws-sdk-js-v3 | deno/client-s3-control/commands/PutStorageLensConfigurationTaggingCommand.ts | TypeScript |
ClassDeclaration | /*
* Licensed under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distribute... | alexamies/chinesenotes-go | web-resources/src/HrefVariableParser.ts | TypeScript |
MethodDeclaration | /**
* Get the value of a variable from the URL string
* @param {string} href - The link to search in
* @param {string} name - The name of the variable
* @return {string} The value of the variable
*/
public getHrefVariable(href: string, name: string): string {
if (!href.includes("?")) {
console.... | alexamies/chinesenotes-go | web-resources/src/HrefVariableParser.ts | TypeScript |
ArrowFunction |
({ children, description, className, category, ...labelProps }) => {
const categories = category?.map((c, i) => {
return (
<span className={'datav-form-label-categories'} key={`${c}/${i}`}>
<span>{c}</span>
<RightOutlined className={'datav-form-label-chevron'} />
</span>
);
} | genoka/datav | ui/src/packages/datav-core/src/ui/components/Form/Label.tsx | TypeScript |
ArrowFunction |
(c, i) => {
return (
<span className={'datav-form-label-categories'} key={`${c}/${i}`} | genoka/datav | ui/src/packages/datav-core/src/ui/components/Form/Label.tsx | TypeScript |
ArrowFunction |
(theme: DatavTheme) => {
return {
label: css`
label: Label;
font-size: ${theme.typography.size.sm};
font-weight: ${theme.typography.weight.semibold};
line-height: 1.25;
margin: ${theme.spacing.formLabelMargin};
padding: ${theme.spacing.formLabelPadding};
color: ${theme.c... | genoka/datav | ui/src/packages/datav-core/src/ui/components/Form/Label.tsx | TypeScript |
InterfaceDeclaration |
export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
children: React.ReactNode;
description?: React.ReactNode;
category?: string[];
} | genoka/datav | ui/src/packages/datav-core/src/ui/components/Form/Label.tsx | TypeScript |
MethodDeclaration |
cx('datav-form-label', className) | genoka/datav | ui/src/packages/datav-core/src/ui/components/Form/Label.tsx | TypeScript |
ArrowFunction |
(propsData: Record<string, any>) =>
mount(SanityImage, {
propsData: {
projectId,
...propsData,
},
}) | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
it('parses asset IDs correctly', () => {
const wrapper = getWrapper({
assetId: 'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
})
expect(wrapper.attributes().src).toBe(
`https://cdn.sanity.io/images/${projectId}/production/7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1... | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
const wrapper = getWrapper({
assetId: 'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
})
expect(wrapper.attributes().src).toBe(
`https://cdn.sanity.io/images/${projectId}/production/7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170.jpg`,
)
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
const wrapper = getWrapper({
assetId: 'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
w: 20,
h: '21',
})
expect(wrapper.attributes().src).toBe(
`https://cdn.sanity.io/images/${projectId}/production/7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170.jpg?h=21&w=... | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
const wrapper = mount(
{
template: `
<SanityImage
asset-id="image-G3i4emG6B8JnTmGoN0UjgAp8-300x450-jpg"
auto="format"
>
<template #default="{ src }">
<img :src="src" />
</template>
</SanityImage>
... | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
const mockError = jest.fn()
// eslint-disable-next-line
console.error = mockError
const failures: [string, any[]][] = [
['auto', [-200, 200]],
['bg', [-200, 200]],
['blur', [-200, 200]],
['crop', [-200, 200]],
['dl', [-200, 200]],
['dpr', [-200, 200]],
['fit', [-200, 200]],... | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
mockError.mockReset()
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
([key, values]) => {
it(`fails for ${key}`, () => {
values.forEach((value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalled()
})
})
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
values.forEach((value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalled()
})
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
(value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalled()
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
([key, values]) => {
it(`succeeds for ${key}`, () => {
values.forEach((value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalledTimes(0)
})
})
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
() => {
values.forEach((value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalledTimes(0)
})
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
ArrowFunction |
(value) => {
getWrapper({
assetId:
'image-7aa06723bb01a7a79055b6d6f5be80329a0e5b58-780x1170-jpg',
[key]: value,
})
expect(mockError).toHaveBeenCalledTimes(0)
} | liqueflies/sanity-module | test/unit/sanity-image.test.ts | TypeScript |
FunctionDeclaration |
export function reducer(state = initialState, action: < | AngularDoc-Showcases/platform | modules/schematics/src/reducer/files/__name@dasherize@if-flat__/__name@dasherize__.reducer.ts | TypeScript |
InterfaceDeclaration |
export interface State {
} | AngularDoc-Showcases/platform | modules/schematics/src/reducer/files/__name@dasherize@if-flat__/__name@dasherize__.reducer.ts | TypeScript |
ClassDeclaration | // @generated message type with reflection information, may provide speed optimized methods
class RollResponse$Type extends MessageType<RollResponse> {
constructor() {
super("monopoly.RollResponse", [
{ no: 1, name: "steps", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
]);
}
creat... | SeawolvesAtCali/Monopoly | protos/gen_ts/monopoly/roll_spec.ts | TypeScript |
InterfaceDeclaration | /**
* type : "roll"
* packet_type : RESPONSE
*
* @generated from protobuf message monopoly.RollResponse
*/
export interface RollResponse {
/**
* @generated from protobuf field: int32 steps = 1;
*/
steps: number;
} | SeawolvesAtCali/Monopoly | protos/gen_ts/monopoly/roll_spec.ts | TypeScript |
MethodDeclaration |
create(value?: PartialMessage<RollResponse>): RollResponse {
const message = { steps: 0 };
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
if (value !== undefined)
reflectionMergePartial<RollResponse>(this, message, value);
return... | SeawolvesAtCali/Monopoly | protos/gen_ts/monopoly/roll_spec.ts | TypeScript |
MethodDeclaration |
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: RollResponse): RollResponse {
let message = target ?? this.create(), end = reader.pos + length;
while (reader.pos < end) {
let [fieldNo, wireType] = reader.tag();
switch (fieldNo) {
... | SeawolvesAtCali/Monopoly | protos/gen_ts/monopoly/roll_spec.ts | TypeScript |
MethodDeclaration |
internalBinaryWrite(message: RollResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
/* int32 steps = 1; */
if (message.steps !== 0)
writer.tag(1, WireType.Varint).int32(message.steps);
let u = options.writeUnknownFields;
if (u !== false)
... | SeawolvesAtCali/Monopoly | protos/gen_ts/monopoly/roll_spec.ts | TypeScript |
ArrowFunction |
() => {
const original = jest.requireActual('@elastic/eui');
return {
...original,
// eslint-disable-next-line react/display-name
EuiFieldText: () => <input />,
};
} | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => <input />, | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => ({
FormDataProvider: ({ children }: { children: ({ tags }: { tags: string[] }) => void }) =>
children({ tags: ['rad', 'dude'] }),
}) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
({ children }: { children: ({ tags }: { tags: string[] }) => void }) =>
children({ tags: ['rad', 'dude'] }) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
const fetchTags = jest.fn();
const formHookMock = getFormMock(sampleData);
beforeEach(() => {
jest.resetAllMocks();
useInsertTimelineMock.mockImplementation(() => defaultInsertTimeline);
usePostCaseMock.mockImplementation(() => defaultPostCase);
useFormMock.mockImplementation(() => ({ for... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
jest.resetAllMocks();
useInsertTimelineMock.mockImplementation(() => defaultInsertTimeline);
usePostCaseMock.mockImplementation(() => defaultPostCase);
useFormMock.mockImplementation(() => ({ form: formHookMock }));
useFormDataMock.mockImplementation(() => [
{
description: sam... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => defaultInsertTimeline | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => defaultPostCase | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => ({ form: formHookMock }) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => [
{
description: sampleData.description,
},
] | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => ({
tags: sampleTags,
fetchTags,
}) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
it('should post case on submit click', async () => {
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
);
wrapper.find(`[data-test-subj="create-case-submit"]`).first().simulate('click... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
);
wrapper.find(`[data-test-subj="create-case-submit"]`).first().simulate('click');
await waitFor(() => expect(postCase).toBe... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => expect(postCase).toBeCalledWith(sampleData) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
);
wrapper.find(`[data-test-subj="create-case-cancel"]`).first().simulate('click');
await waitFor(() => expect(mockHistory.pu... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => expect(mockHistory.push).toHaveBeenCalledWith('/') | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
const sampleId = '777777';
usePostCaseMock.mockImplementation(() => ({
...defaultPostCase,
caseData: { id: sampleId },
}));
mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => ({
...defaultPostCase,
caseData: { id: sampleId },
}) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => expect(mockHistory.push).toHaveBeenNthCalledWith(1, '/777777') | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
usePostCaseMock.mockImplementation(() => ({ ...defaultPostCase, isLoading: true }));
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
);
await waitFor(() =>
expect(wr... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => ({ ...defaultPostCase, isLoading: true }) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() =>
expect(wrapper.find(`[data-test-subj="create-case-loading-spinner"]`).exists()).toBeTruthy() | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
);
await waitFor(() =>
expect(
wrapper
.find(`[data-test-subj="caseTags"] [data-test-subj="input"]`)
... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() =>
expect(
wrapper
.find(`[data-test-subj="caseTags"] [data-test-subj="input"]`)
.first()
.prop('options')
).toEqual([{ label: 'coke' }, { label: 'pepsi' }, { label: 'rad' }, { label: 'dude' }]) | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
const connectorTypes = [
{
label: 'Jira',
testId: 'jira-1',
dataTestSubj: 'connector-settings-jira',
},
{
label: 'Resilient',
testId: 'resilient-2',
dataTestSubj: 'connector-settings-resilient',
},
{
label: 'ServiceNow',
... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
({ label, testId, dataTestSubj }) => {
it(`should change from none to ${label} connector fields`, async () => {
useConnectorsMock.mockReturnValue({
...sampleConnectorData,
connectors: connectorsMock,
});
const wrapper = mount(
<TestProviders>
<Ro... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
async () => {
useConnectorsMock.mockReturnValue({
...sampleConnectorData,
connectors: connectorsMock,
});
const wrapper = mount(
<TestProviders>
<Router history={mockHistory}>
<Create />
</Router>
</TestProviders>
... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
expect(wrapper.find(`[data-test-subj="${dataTestSubj}"]`).exists()).toBeFalsy();
wrapper.find('button[data-test-subj="dropdown-connectors"]').simulate('click');
wrapper.find(`button[data-test-subj="dropdown-connector-${testId}"]`).simulate('click');
wrapper.update();
... | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
ArrowFunction |
() => {
wrapper.update();
expect(wrapper.find(`[data-test-subj="${dataTestSubj}"]`).exists()).toBeTruthy();
} | eyalkoren/kibana | x-pack/plugins/security_solution/public/cases/components/create/index.test.tsx | TypeScript |
FunctionDeclaration |
export async function requireRequestBody(req: Request): Promise<unknown> {
const contentType = req.header('content-type');
if (!contentType) {
throw new InputError('Content-Type missing');
} else if (!contentType.match(/^application\/json($|;)/)) {
throw new InputError('Illegal Content-Type');
}
con... | AlleyWei/backstage | plugins/catalog-backend/src/service/util.ts | TypeScript |
FunctionDeclaration |
export async function validateRequestBody<T>(
req: Request,
schema: yup.Schema<T>,
): Promise<T> {
const body = await requireRequestBody(req);
try {
await schema.validate(body, { strict: true });
} catch (e) {
throw new InputError(`Malformed request: ${e}`);
}
return (body as unknown) as T;
} | AlleyWei/backstage | plugins/catalog-backend/src/service/util.ts | TypeScript |
FunctionDeclaration |
export function disallowReadonlyMode(readonly: boolean) {
if (readonly) {
throw new NotAllowedError('This operation not allowed in readonly mode');
}
} | AlleyWei/backstage | plugins/catalog-backend/src/service/util.ts | TypeScript |
ClassDeclaration | /**
* <p>Deletes the known host key or certificate used by the Amazon Lightsail browser-based SSH or
* RDP clients to authenticate an instance. This operation enables the Lightsail browser-based
* SSH or RDP clients to connect to the instance after a host key mismatch.</p>
* <important>
* ... | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
InterfaceDeclaration |
export interface DeleteKnownHostKeysCommandInput extends DeleteKnownHostKeysRequest {} | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
InterfaceDeclaration |
export interface DeleteKnownHostKeysCommandOutput extends DeleteKnownHostKeysResult, __MetadataBearer {} | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
MethodDeclaration | /**
* @internal
*/
resolveMiddleware(
clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>,
configuration: LightsailClientResolvedConfig,
options?: __HttpHandlerOptions
): Handler<DeleteKnownHostKeysCommandInput, DeleteKnownHostKeysCommandOutput> {
this.middlewareStack.use(getSerd... | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
MethodDeclaration |
private serialize(input: DeleteKnownHostKeysCommandInput, context: __SerdeContext): Promise<__HttpRequest> {
return serializeAws_json1_1DeleteKnownHostKeysCommand(input, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
MethodDeclaration |
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<DeleteKnownHostKeysCommandOutput> {
return deserializeAws_json1_1DeleteKnownHostKeysCommand(output, context);
} | Acium-Global/aws-sdk-js-v3 | clients/client-lightsail/commands/DeleteKnownHostKeysCommand.ts | TypeScript |
FunctionDeclaration |
export declare function isEmpty(value: any): boolean; | cdieter/tmdb-proj | node_modules/postgraphile/build-turbo/postgraphile/http/createPostGraphileHttpRequestHandler.d.ts | TypeScript |
FunctionDeclaration | /**
* Creates a GraphQL request handler that can support many different `http` frameworks, including:
*
* - Native Node.js `http`.
* - `connect`.
* - `express`.
* - `koa` (2.0).
*/
export default function createPostGraphileHttpRequestHandler(options: CreateRequestHandlerOptions): HttpRequestHandler; | cdieter/tmdb-proj | node_modules/postgraphile/build-turbo/postgraphile/http/createPostGraphileHttpRequestHandler.d.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.