type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
public flush() { }
ElizabethSamuel-MSFT/FluidFramework
packages/runtime/test-runtime-utils/src/mockDeltas.ts
TypeScript
MethodDeclaration
public submit(type: MessageType, contents: any, batch = false, localOpMetadata: any): number { return 0; }
ElizabethSamuel-MSFT/FluidFramework
packages/runtime/test-runtime-utils/src/mockDeltas.ts
TypeScript
TypeAliasDeclaration
export type UseFieldArrayProps< TFieldValues extends FieldValues = FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>, TKeyName extends string = 'id', > = { name: TFieldArrayName; keyName?: TKeyName; control?: Control<TFieldValues>; shouldUnregister?: boolean...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * `useFieldArray` returned `fields` with unique id */ export type FieldArrayWithId< TFieldValues extends FieldValues = FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>, TKeyName extends string = 'id', > = FieldArray<TFieldValues, TFieldArrayName> & Record<TKey...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
export type FieldArray< TFieldValues extends FieldValues = FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>, > = FieldArrayPathValue<TFieldValues, TFieldArrayName> extends | ReadonlyArray<infer U> | null | undefined ? U : never;
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * `useFieldArray` focus option, ability to toggle focus on and off with `shouldFocus` and setting focus by either field index or name. */ export type FieldArrayMethodProps = { shouldFocus?: boolean; focusIndex?: number; focusName?: string; };
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Swap field array by supplying from and to index * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param indexA - from index * @param indexB - to index * * @example * ```tsx * <button type="button" onClick={() => swap(0, 1)}>swap</butt...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Move field array by supplying from and to index * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param indexA - from index * @param indexB - to index * * @example * ```tsx * <button type="button" onClick={() => move(0, 1)}>swap</butt...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Prepend field/fields to the start of the fields and optionally focus. The input value will be registered during this action. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param value - prepend items or items * @param options - focus o...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Append field/fields to the end of your fields and focus. The input value will be registered during this action. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param value - append items or items. * @param options - focus options * * ...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Remove field/fields at particular position. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param index - index to remove at, or remove all when no index provided. * * @example * ```tsx * <button type="button" onClick={() => remove(0...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Insert field/fields at particular position and focus. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param index - insert position * @param value - insert field or fields * @param options - focus options * * @example * ```tsx * <b...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Update field/fields at particular position. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param index - insert position * @param value - insert field or fields * * @example * ```tsx * <button type="button" onClick={() => update(1,...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
/** * Replace the entire field array values. * * @remarks * [API](https://react-hook-form.com/api/usefieldarray) • [Demo](https://codesandbox.io/s/calc-i231d) * * @param value - the entire field values. * * @example * ```tsx * <button * type="button" * onClick={() => update([{ name: "data" }, { name: "d...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
TypeAliasDeclaration
export type UseFieldArrayReturn< TFieldValues extends FieldValues = FieldValues, TFieldArrayName extends FieldArrayPath<TFieldValues> = FieldArrayPath<TFieldValues>, TKeyName extends string = 'id', > = { swap: UseFieldArraySwap; move: UseFieldArrayMove; prepend: UseFieldArrayPrepend<TFieldValues, TFieldArr...
MichalTarasiuk/react-hook-form
src/types/fieldArray.ts
TypeScript
ArrowFunction
() => { test("with space", () => { assert( create("borf", { space: { resolutions: { borf: true } } }).type ).typed as true assert( create( { snorf: "borf[]" }, { ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { assert( create("borf", { space: { resolutions: { borf: true } } }).type ).typed as true assert( create( { snorf: "borf[]" }, { space: { ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => compile({ a: { b: "b", isA: "true", isB: "false" }, b: { a: "a", isA: "false", isB: "true" } })
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const { type } = getCyclicSpace().create( { a: "a", b: "b" }, { parse: { onCycle: { cyclic: "cyclic?" } } } ) a...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const { type } = getCyclicSpace().create( { a: "a", b: "b" }, { parse: { onCycle: { cyclic: "cyclic?" }, deepOnCycle: true } ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const { type } = getCyclicSpace().create( { referencesA: "a", noReferences: { favoriteSoup: "'borscht'" } }, { parse: { onR...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { test("simple space", () => { const groceries = create( { fruits: "fruit[]" }, { space: { resolutions: { banana: { length: "number", ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const groceries = create( { fruits: "fruit[]" }, { space: { resolutions: { banana: { length: "number", description: "string?" ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { // @ts-expect-error const shallowRecursive = compile({ a: "a" }) expect(() => shallowRecursive.models.a.assert("what's an a?") ).toThrowError("shallow") // @ts-expect-error const shallowCyclic = compile({ a: "b", b: "c", c:...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => shallowRecursive.models.a.assert("what's an a?")
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => shallowCyclic.models.a.assert(["what's a b?"])
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const bicycle = create( { a: "a", b: "b", c: "either[]" }, { space: { resolutions: { a: { a: "a?", b: "b?", isA: "true" }, b: { a: "a?", b: "b?", isA: "false" }, ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { // Parse any as type assert(create({} as any).type).typed as any // Parse any as space const parseWithAnySpace = () => create( { literal: "string", alias: "myType" }, { space: {} as any } ).t...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => create( { literal: "string", alias: "myType" }, { space: {} as any } ).type
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { test("simple space", () => { expect( create( { fruits: "fruit[]", bestBanana: "banana", bestApple: "apple", bestFruit: "fruit", optiona...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { expect( create( { fruits: "fruit[]", bestBanana: "banana", bestApple: "apple", bestFruit: "fruit", optionalFruit: "fruit?" ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { // If it's optional, the cycle should be ignored and just return undefined expect( create("a", { space: { resolutions: { a: { b: "b" }, b: { c: "c?" }, ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { expect(() => create("a", { space: { resolutions: { a: { b: "b" }, b: { c: "c" }, c: "a|b" } } }...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => create("a", { space: { resolutions: { a: { b: "b" }, b: { c: "c" }, c: "a|b" } } }).generate()
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { expect( create("a", { space: { resolutions: { a: { b: "b" }, b: { c: "c" }, c: "a|b" } } }).gen...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { expect( create("a|b", { space: { resolutions: { a: { b: "b" }, b: { a: "a" } } } }).generate({ onRequiredCycle: "cycle" }) ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { const defaultValue = create( { requiredGroup: "group", requiredGroups: "group[]", optionalGroup: "group?", optionalGroups: "group[]?" }, { space: { ...
ShawnMorreau/re-po
pkgs/model/src/definitions/str/fragment/reference/__tests__/alias.assert.ts
TypeScript
ArrowFunction
() => { let shallow; beforeAll(() => { shallow = createShallow(); }); const getProps = () => ({ name: 'test name', text: 'test text', classes: {}, ...((global as any) as any).eventkit_test_props, }); const getWrapper = props => shallow(<LicenseRow {......
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
() => { shallow = createShallow(); }
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
() => ({ name: 'test name', text: 'test text', classes: {}, ...((global as any) as any).eventkit_test_props, })
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
props => shallow(<LicenseRow {...props} />)
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
() => { const props = getProps(); const wrapper = getWrapper(props); expect(wrapper.find(TableRow)).toHaveLength(1); expect(wrapper.find(TableCell)).toHaveLength(7); expect(wrapper.find(BaseDialog)).toHaveLength(1); expect(wrapper.find('i')).toHaveLength(1); expe...
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
() => { const props = getProps(); const stateSpy = sinon.spy(LicenseRow.prototype, 'setState'); const wrapper = shallow(<LicenseRow {...props} />); expect(stateSpy.called).toBe(false); wrapper.instance().setLicenseOpen(); expect(stateSpy.calledOnce).toBe(true); e...
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
ArrowFunction
() => { const props = getProps(); const stateSpy = sinon.spy(LicenseRow.prototype, 'setState'); const wrapper = shallow(<LicenseRow {...props} />); expect(stateSpy.called).toBe(false); wrapper.instance().handleLicenseClose(); expect(stateSpy.calledOnce).toBe(true); ...
venicegeo/eventkit-cloud
eventkit_cloud/ui/static/ui/app/tests/StatusDownloadPage/LicenseRow.spec.tsx
TypeScript
FunctionDeclaration
export function useScrollTo({ el, to, duration = 500, callback }: ScrollToParams) { const isActiveRef = ref(false); const start = position(el); const change = to - start; const increment = 20; let currentTime = 0; duration = isUnDef(duration) ? 500 : duration; const animateScroll = function () { if ...
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
ArrowFunction
(t: number, b: number, c: number, d: number) => { t /= d / 2; if (t < 1) { return (c / 2) * t * t + b; } t--; return (-c / 2) * (t * (t - 2) - 1) + b; }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
ArrowFunction
(el: HTMLElement, amount: number) => { el.scrollTop = amount; }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
ArrowFunction
(el: HTMLElement) => { return el.scrollTop; }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
ArrowFunction
() => { isActiveRef.value = true; animateScroll(); }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
ArrowFunction
() => { isActiveRef.value = false; }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
InterfaceDeclaration
export interface ScrollToParams { el: any; to: number; duration?: number; callback?: () => any; }
Meihualu-cc/vue3-vite-typescript-admin
src/hooks/event/useScrollTo.ts
TypeScript
InterfaceDeclaration
/** * StatefulSetList is a collection of StatefulSets. * @export * @interface V1StatefulSetList */ export default interface V1StatefulSetList extends KubeObject { /** * APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal ...
aapf/cross-kube
src/models/V1StatefulSetList.ts
TypeScript
FunctionDeclaration
/** This function will update all commands, or the defined scope */ export async function updateCommands( bot: BotWithCache, scope?: "Guild" | "Global", ) { const globalCommands: MakeRequired<CreateApplicationCommand, "name">[] = []; const perGuildCommands: MakeRequired<CreateApplicationCommand, "name">[] = [];...
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
/** Update commands for a guild */ export async function updateGuildCommands(bot: Bot, guild: Guild) { const perGuildCommands: MakeRequired<CreateApplicationCommand, "name">[] = []; for (const command of commands.values()) { if (command.scope) { if (command.scope === "Guild") { perGuildCommands.p...
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
export async function getGuildFromId( bot: BotWithCache, guildId: bigint, ): Promise<Guild> { let returnValue: Guild = {} as Guild; if (guildId !== 0n) { if (bot.guilds.get(guildId)) { returnValue = bot.guilds.get(guildId) as Guild; } await getGuild(bot, guildId).then((guild) => { bot...
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
export function snowflakeToTimestamp(id: bigint) { return Number(id / 4194304n + 1420070400000n); }
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
export function humanizeMilliseconds(milliseconds: number) { // Gets ms into seconds const time = milliseconds / 1000; if (time < 1) return "1s"; const days = Math.floor(time / 86400); const hours = Math.floor((time % 86400) / 3600); const minutes = Math.floor(((time % 86400) % 3600) / 60); const second...
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
export function isSubCommand( data: subCommand | subCommandGroup, ): data is subCommand { return !Reflect.has(data, "subCommands"); }
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
FunctionDeclaration
export function isSubCommandGroup( data: subCommand | subCommandGroup, ): data is subCommandGroup { return Reflect.has(data, "subCommands"); }
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
ArrowFunction
async (guild) => { await upsertApplicationCommands(bot, perGuildCommands, guild.id); }
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
ArrowFunction
(guild) => { bot.guilds.set(guildId, guild); returnValue = guild; }
AwesomeStickz/discordeno
template/minimal/src/utils/helpers.ts
TypeScript
ArrowFunction
() => { let component: TestComponent; let fixture: ComponentFixture<TestComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [TestComponent], imports: [TileModule] }).compileComponents(); })); beforeEach(() => { fixtur...
konradkukier2/fundamental-ngx
library/src/lib/tile/product-tile-content/product-tile-content.directive.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [TestComponent], imports: [TileModule] }).compileComponents(); }
konradkukier2/fundamental-ngx
library/src/lib/tile/product-tile-content/product-tile-content.directive.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(TestComponent); component = fixture.componentInstance; fixture.detectChanges(); }
konradkukier2/fundamental-ngx
library/src/lib/tile/product-tile-content/product-tile-content.directive.spec.ts
TypeScript
ArrowFunction
() => { expect(component.ref.nativeElement.className).toBe('fd-product-tile__content'); }
konradkukier2/fundamental-ngx
library/src/lib/tile/product-tile-content/product-tile-content.directive.spec.ts
TypeScript
ClassDeclaration
@Component({ template: ` <h2 #directiveElement fd-product-tile-content>Product Tile Content Test</h2> ` }) class TestComponent { @ViewChild('directiveElement') ref: ElementRef; }
konradkukier2/fundamental-ngx
library/src/lib/tile/product-tile-content/product-tile-content.directive.spec.ts
TypeScript
FunctionDeclaration
export function calculateETag (text: string) { return crypto.createHash('md5').update(text).digest('base64') }
RubenVerborgh/wac-ldp
src/lib/util/calculateETag.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app', templateUrl: './app.html', directives: [CommentForm, CommentComponenet], styleUrls: ['app.css'], providers: [Comments], pipes: [SortByField] }) export class App { _reverseDate:Boolean = true; constructor(private commentsService:Comments) { this._r...
sheezes/ng2-comments
src/app/app.ts
TypeScript
MethodDeclaration
changeSortingOrder() { this._reverseDate = !this.reverseDate; }
sheezes/ng2-comments
src/app/app.ts
TypeScript
ArrowFunction
(props: { isHeaderVisible: boolean }) => ( <DemoPage jsonDocs={require('@uifabric/api-docs/lib/pages/office-ui-fabric-react/Separator.page.json')}
17jlee2/fluentui
apps/fabric-website-resources/src/components/pages/SeparatorPage.tsx
TypeScript
MethodDeclaration
require('@uifabric/api-docs/lib/pages/office-ui-fabric-react/Separator.page.json')
17jlee2/fluentui
apps/fabric-website-resources/src/components/pages/SeparatorPage.tsx
TypeScript
ClassDeclaration
/** Class representing a ManagementPolicies. */ export class ManagementPoliciesImpl implements ManagementPolicies { private readonly client: StorageManagementClientContext; /** * Initialize a new instance of the class ManagementPolicies class. * @param client Reference to the service client */ construct...
0rland0Wats0n/azure-sdk-for-js
sdk/storage/arm-storage/src/operations/managementPolicies.ts
TypeScript
MethodDeclaration
/** * Gets the managementpolicy associated with the specified storage account. * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource...
0rland0Wats0n/azure-sdk-for-js
sdk/storage/arm-storage/src/operations/managementPolicies.ts
TypeScript
MethodDeclaration
/** * Sets the managementpolicy to the specified storage account. * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resource group. Stora...
0rland0Wats0n/azure-sdk-for-js
sdk/storage/arm-storage/src/operations/managementPolicies.ts
TypeScript
MethodDeclaration
/** * Deletes the managementpolicy associated with the specified storage account. * @param resourceGroupName The name of the resource group within the user's subscription. The name is * case insensitive. * @param accountName The name of the storage account within the specified resou...
0rland0Wats0n/azure-sdk-for-js
sdk/storage/arm-storage/src/operations/managementPolicies.ts
TypeScript
ArrowFunction
(data: { tag: string; item: NbMenuItem }) => console.info(data)
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item1', template: ` <h1>Menu Item #1</h1> `, }) export class NbMenuItem1Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item2', template: ` <h1>Menu Item #2</h1> `, }) export class NbMenuItem2Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item3', template: ` <router-outlet></router-outlet> `, }) export class NbMenuItem3Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item31', template: ` <h1>Menu Item #3.1</h1> `, }) export class NbMenuItem31Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item32', template: ` <h1>Menu Item #3.2</h1> `, }) export class NbMenuItem32Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item33', template: ` <router-outlet></router-outlet> `, }) export class NbMenuItem33Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item331', template: ` <h1>Menu Item #3.3.1</h1> `, }) export class NbMenuItem331Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item332', template: ` <h1>Menu Item #3.3.2</h1> `, }) export class NbMenuItem332Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-item4', template: ` <h1>Menu Item #4</h1> `, }) export class NbMenuItem4Component { }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'nb-menu-test', template: ` <nb-layout> <nb-sidebar state="compacted"> <nb-menu id="menu-sidebar" tag="sidebarMenu" [items]="menuItems"></nb-menu> </nb-sidebar> <nb-layout-column> <nb-card size="xxlarge"> <nb-card-body> <nb-menu id=...
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.menuService .onItemClick() .pipe(takeWhile(() => this.alive)) .subscribe((data: { tag: string; item: NbMenuItem }) => console.info(data)); this.menuService .onItemSelect() .pipe(takeWhile(() => this.alive)) .subscribe((data: { tag: string; item: NbMenuItem...
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
MethodDeclaration
addMenuItem() { this.menuService.addItems([{ title: 'New Menu Item' }], 'firstMenu'); }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
MethodDeclaration
navigateHome() { this.menuService.navigateHome('firstMenu'); }
GianlucaRi/nebular
src/app/menu-test/menu-test.component.ts
TypeScript
ClassDeclaration
export class UserDto { readonly username: String; readonly password: String; readonly firstName: String; readonly lastName: String; readonly birthDate: Date; }
JerGun/NestJS-MiniProject
src/dto/users.dto.ts
TypeScript
ClassDeclaration
export class EditUserDto { readonly id: String; readonly firstName: String; readonly lastName: String; readonly birthDate: Date; }
JerGun/NestJS-MiniProject
src/dto/users.dto.ts
TypeScript
ArrowFunction
() => { let injector: MockInjector; let credentialsService: INativeCredentialService; const testData = { service: 'test', account: 'test', }; beforeAll(() => { injector = createBrowserInjector([]); injector.addProviders( { token: AppConfig, useValue: {}, }, {...
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
() => { injector = createBrowserInjector([]); injector.addProviders( { token: AppConfig, useValue: {}, }, { token: INativeCredentialService, useClass: CredentialService, }, { token: ILogServiceManager, useValue: { getLogger...
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
() => console
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { await injector.disposeAll(); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { const password = 'password'; await credentialsService.setPassword(testData.service, testData.account, password); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { const pw = await credentialsService.getPassword(testData.service, testData.account); expect(pw).toBeDefined(); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { const found = await credentialsService.findPassword(testData.service); expect(found).toBeDefined(); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { const crds = await credentialsService.findCredentials(testData.service); expect(Array.isArray(crds)).toBeTruthy(); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript
ArrowFunction
async () => { const deleted = await credentialsService.deletePassword(testData.service, testData.account); expect(deleted).toBeTruthy(); }
opensumi/core
packages/core-node/__tests__/common-module/credential.server.test.ts
TypeScript