type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
InterfaceDeclaration
export interface IFormHelper<T extends {}> { nameOf: (key: keyof T) => string idOf: (key: keyof T) => string }
shopstic/react-rfp
src/forms.ts
TypeScript
MethodDeclaration
nameOf(key: keyof T) { return key as string }
shopstic/react-rfp
src/forms.ts
TypeScript
MethodDeclaration
idOf(id: keyof T) { return formUid + '_' + id }
shopstic/react-rfp
src/forms.ts
TypeScript
ArrowFunction
(list: string[], itemsBoxParams: Partial<IItemBoxProps> = {}): IItemBoxProps[] => _.map(list, (value: string) => ({...itemsBoxParams, value}))
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
ArrowFunction
(value: string) => ({...itemsBoxParams, value})
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
ArrowFunction
(items: IItemBoxProps[]): string[] => _.pluck(items, 'value')
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
ArrowFunction
( state: IStringListCompositeState = stringListInitialState, action: IReduxAction<IStringListPayload>, ): IStringListCompositeState => { if (!action.payload || (!state[action.payload.id] && action.type !== StringListActions.add) || (state[action.payload.id] && action.type === String...
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
InterfaceDeclaration
export interface IStringListState { id: string; list: string[]; }
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
TypeAliasDeclaration
export type IStringListCompositeState = {[id: string]: IStringListState};
MichelML/react-vapor
src/reusableState/customList/StringListReducers.ts
TypeScript
ArrowFunction
p => (p.inverted ? 'transparent' : Colors.WHITE)
arturmiglio/wave
src/components/Input/BaseInput.ts
TypeScript
ArrowFunction
p => (p.inverted ? Colors.WHITE : Colors.AUTHENTIC_BLUE_900)
arturmiglio/wave
src/components/Input/BaseInput.ts
TypeScript
ArrowFunction
p => (p.inverted ? Colors.AUTHENTIC_BLUE_200 : Colors.AUTHENTIC_BLUE_350)
arturmiglio/wave
src/components/Input/BaseInput.ts
TypeScript
ArrowFunction
p => (p.inverted ? Colors.AUTHENTIC_BLUE_550 : Colors.AUTHENTIC_BLUE_200)
arturmiglio/wave
src/components/Input/BaseInput.ts
TypeScript
InterfaceDeclaration
interface InternalInputComponentProps extends Omit<InputProps, 'label'> { hasValue?: boolean; }
arturmiglio/wave
src/components/Input/BaseInput.ts
TypeScript
ArrowFunction
(event:RouterEvent) => { if(event && event.url){ this.selectedPath = event.url; } }
andreaescobarb/hb
Hospital/src/app/pages/menu/menu.page.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-menu', templateUrl: './menu.page.html', styleUrls: ['./menu.page.scss'], }) export class MenuPage implements OnInit { pages = [ { title: 'Inicio', url: '/menu/tabs', icon: 'home' }, { title: 'Citas Programadas', url: '/menu/cuenta', ic...
andreaescobarb/hb
Hospital/src/app/pages/menu/menu.page.ts
TypeScript
MethodDeclaration
logout(){ this.authenticationService.logout(); this.router.navigate(['/login']); }
andreaescobarb/hb
Hospital/src/app/pages/menu/menu.page.ts
TypeScript
ClassDeclaration
export class AuthCredentialsDto { @IsString() @MinLength(4) @MaxLength(20) username: string; @IsString() @MinLength(8) @MaxLength(32) @Matches(/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, { message: 'Password is too weak', }) password: string; }
lexico4real/NestJs-Tasks-Management
src/auth/dto/auth-credentials.dto.ts
TypeScript
InterfaceDeclaration
export interface Store { sample: number }
samsan1212/gatsby-starter-styled-ts
src/__types__/app-redux/store.d.ts
TypeScript
TypeAliasDeclaration
type AnyContext = Context< any, any, any, any, any, any, any, any, any, any >;
JonathanWilbur/context
source/AnyContext.ts
TypeScript
ArrowFunction
() => { const listConfig = { find: true, filters: ["c2", "c3"], emptySelectionActionGroups: { g1: { a1: { title: "Add", icon: "Add", subject: ["list", "add"] }, }, }, columns: { c1: { title: "Member name", sortable: "alphabetical" as TSortable, }, ...
heath-hamilton/microsoft-teams-ui-component-library
stories/List.stories.tsx
TypeScript
MethodDeclaration
boolean("Truncate", false, listKnobGroupID)
heath-hamilton/microsoft-teams-ui-component-library
stories/List.stories.tsx
TypeScript
MethodDeclaration
boolean("Selectable", true, listKnobGroupID)
heath-hamilton/microsoft-teams-ui-component-library
stories/List.stories.tsx
TypeScript
ArrowFunction
() => { let component: AddSectionDestinationComponent; let fixture: ComponentFixture<AddSectionDestinationComponent>; beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [ AddSectionDestinationComponent ] }) .compileComponents(); }); beforeEach(() => { fixtur...
webdeveloper510/karl-suntours-admin
src/app/views/add-section-destination/add-section-destination.component.spec.ts
TypeScript
ArrowFunction
async () => { await TestBed.configureTestingModule({ declarations: [ AddSectionDestinationComponent ] }) .compileComponents(); }
webdeveloper510/karl-suntours-admin
src/app/views/add-section-destination/add-section-destination.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(AddSectionDestinationComponent); component = fixture.componentInstance; fixture.detectChanges(); }
webdeveloper510/karl-suntours-admin
src/app/views/add-section-destination/add-section-destination.component.spec.ts
TypeScript
ArrowFunction
() => { it("is initialized to undefined values", () => { const t = new Table<number>(10, 10); for (let x = 0; x < 10; x++) { for (let y = 0; y < 10; y++) { expect(t.get({ x, y })).toEqual(undefined); } } }); it("can fill the entire table", () => { const t = new Table<number>...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); for (let x = 0; x < 10; x++) { for (let y = 0; y < 10; y++) { expect(t.get({ x, y })).toEqual(undefined); } } }
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); for (let i = 0; i < 10; i++) { t.fill(i); for (let x = 0; x < t.width; x++) { for (let y = 0; y < t.height; y++) { expect(t.get({ x, y })).toEqual(i); } } } }
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); t.fill(10); expect(t.get({ x: -10, y: 10 })).toEqual(undefined); expect(t.get({ x: 10, y: -10 })).toEqual(undefined); expect(t.get({ x: -10, y: -10 })).toEqual(undefined); }
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); expect(t.get({ x: 0, y: 0 })).toEqual(undefined); t.set({ x: 0, y: 0 }, 1); expect(t.get({ x: 0, y: 0 })).toEqual(1); expect(t.get({ x: 0, y: 0 })).not.toEqual(undefined); t.set({ x: 0, y: 0 }, undefined); expect(t.get({ x: 0, y: 0 })).toEqua...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); const tests: [number, number, string][] = [ [-1, 0, "-1:0 is not in bounds"], [0, -1, "0:-1 is not in bounds"], [-1, -1, "-1:-1 is not in bounds"], [10, 10, "10:10 is not in bounds"], [100, 100, "100:100 is not in bounds"], [Infi...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => t.set({ x: x, y: y }, 100)
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); // Corner Case const cornerNeighbors = t.getNeighbors({ x: 0, y: 0 }, undefined, "four"); expect(cornerNeighbors).toHaveLength(2); expect(cornerNeighbors).toContainEqual({ x: 1, y: 0 }); expect(cornerNeighbors).toContainEqual({ x: 0, y: 1 }); /...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); // Corner Case const cornerNeighbors = t.getNeighbors({ x: 0, y: 0 }); expect(cornerNeighbors).toHaveLength(3); expect(cornerNeighbors).toContainEqual({ x: 1, y: 0 }); expect(cornerNeighbors).toContainEqual({ x: 0, y: 1 }); expect(cornerNeighbor...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { const t = new Table<number>(10, 10); const n = t.getNeighbors({ x: 0, y: 0 }, (pos, _) => pos.x == 1, "eight"); expect(n).toEqual([ { x: 1, y: 0 }, { x: 1, y: 1 }, ]); }
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
(pos, _) => pos.x == 1
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
ArrowFunction
() => { let t = new Table(10, 10); let selection = t.floodFillSelect({ x: 0, y: 0 }); expect(selection).toHaveLength(100); for (let x = 0; x < 10; x++) { for (let y = 0; y < 10; y++) { expect(selection).toContainEqual({ x, y }); } } t = new Table(10, 10); // Test no v...
JoshuaBevers/malwoden
src/util/table.spec.ts
TypeScript
FunctionDeclaration
function BlockSaveWrapper({ children }: { children?: React.ReactElement | null; }): JSX.Element { return <div style={style}>{children}</div>; }
05259/freeCodeCamp
client/src/components/formHelpers/block-save-wrapper.tsx
TypeScript
ClassDeclaration
/** Formatter for amount (thousand's separator and rounded to two fractional digits) */ @Injectable() export class AmountFormatter implements InputFormatter<number> { private language: string; private systemDecimalSeparator: string; private userDecimalSeparator: string; private cleaner: RegExp; constructor()...
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
MethodDeclaration
private static rounded(rawValue: number): number { // avoid 'toFixed()' for rounded as it is buggy return Math.round(rawValue * 100) / 100; }
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
MethodDeclaration
public setLanguage(language: string) { this.language = language; this.systemDecimalSeparator = (1.1).toFixed(1).substring(1, 2); this.userDecimalSeparator = (1.1) .toLocaleString(this.language) .substring(1, 2); this.cleaner = new RegExp('[^0-9' + this.userDecimalSeparator + ']', 'g'); }
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
MethodDeclaration
rawValue(formattedValue: string): number { if (!formattedValue) { return null; } let cleanedValue = formattedValue.replace(this.cleaner, ''); if (this.userDecimalSeparator !== this.systemDecimalSeparator) { cleanedValue = cleanedValue.replace( this.userDecimalSeparator, this...
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
MethodDeclaration
formattedValue(rawValue: number): string { if (rawValue === undefined || rawValue === null) { return ''; } const n = AmountFormatter.rounded(rawValue); return n.toLocaleString(this.language, { minimumFractionDigits: 2 }); }
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
MethodDeclaration
editValue(rawValue: number): string { if (rawValue === undefined || rawValue === null) { return ''; } const n = AmountFormatter.rounded(rawValue); return n .toLocaleString(this.language, { minimumFractionDigits: 2 }) .replace(this.cleaner, ''); }
asigner/SwissQRBill
ui/src/app/input-fields/amount-formatter.ts
TypeScript
ArrowFunction
(a: Creature, b: Creature) => { if (a.isDead() && b.isDead()) { return 0; } else if (a.isDead()) { return 1; } else if (b.isDead()) { return -1; } else { return b.hp.current - a.hp.current; } }
Trymunx/dragon-slayer
src/game/overview/Display.ts
TypeScript
InterfaceDeclaration
export interface Display extends ROT.Display { drawWorld: () => void; drawPaused: () => void; }
Trymunx/dragon-slayer
src/game/overview/Display.ts
TypeScript
ArrowFunction
() => { let component: LoaderShadeComponent; let fixture: ComponentFixture<LoaderShadeComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ LoaderShadeComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(LoaderS...
Max-UNLaM/pw2-tpfinal-front
src/app/shared/ui/loader-shade/loader-shade.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ LoaderShadeComponent ] }) .compileComponents(); }
Max-UNLaM/pw2-tpfinal-front
src/app/shared/ui/loader-shade/loader-shade.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(LoaderShadeComponent); component = fixture.componentInstance; fixture.detectChanges(); }
Max-UNLaM/pw2-tpfinal-front
src/app/shared/ui/loader-shade/loader-shade.component.spec.ts
TypeScript
ArrowFunction
(options) => (source) => source.pipe( filterFieldsByNameTransformer.operator({ exclude: { names: mapToExcludeArray(options.excludeByName) }, }), orderFieldsTransformer.operator(options), renameFieldsTransformer.operator(options) )
AIValueTW/grafana
packages/grafana-data/src/transformations/transformers/organize.ts
TypeScript
ArrowFunction
(source) => source.pipe( filterFieldsByNameTransformer.operator({ exclude: { names: mapToExcludeArray(options.excludeByName) }, }), orderFieldsTransformer.operator(options), renameFieldsTransformer.operator(options) )
AIValueTW/grafana
packages/grafana-data/src/transformations/transformers/organize.ts
TypeScript
ArrowFunction
(excludeByName: Record<string, boolean>): string[] => { if (!excludeByName) { return []; } return Object.keys(excludeByName).filter((name) => excludeByName[name]); }
AIValueTW/grafana
packages/grafana-data/src/transformations/transformers/organize.ts
TypeScript
ArrowFunction
(name) => excludeByName[name]
AIValueTW/grafana
packages/grafana-data/src/transformations/transformers/organize.ts
TypeScript
InterfaceDeclaration
export interface OrganizeFieldsTransformerOptions extends OrderFieldsTransformerOptions, RenameFieldsTransformerOptions { excludeByName: Record<string, boolean>; }
AIValueTW/grafana
packages/grafana-data/src/transformations/transformers/organize.ts
TypeScript
ArrowFunction
(result: any) => { console.log(result); //var pageToJump = result.pageToJump ? result.pageToJump : 'index'; if (result.code = '200') { this.router.navigateByUrl('/login') } else { alert('注册失败') ...
kunyashaw/ajia_ng4_frontend
src/app/register/register.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'storeRegister', templateUrl: './register.component.html', styleUrls: ['./login.css'] }) export class RegisterComponent implements OnInit { //userName = ""; constructor(private httpService: HttpService, private router: Router) { } ngOnInit() { } handleSubmit(data: ...
kunyashaw/ajia_ng4_frontend
src/app/register/register.component.ts
TypeScript
MethodDeclaration
handleSubmit(data: any) { this.httpService.sendPostRequest( '/user/register.php/?&callback=JSONP_CALLBACK', "uname=" + data.uname + "&upwd=" + data.upwd + "&phone=" + data.phone + "&email=" + data.email ) .subscribe((result: any) => { console.log(res...
kunyashaw/ajia_ng4_frontend
src/app/register/register.component.ts
TypeScript
ArrowFunction
({ text, required, style, className }: LabelProps) => { return ( <LabelBlock style={style} className={className}> {text} {required && <TinyCircle title={"required"} />} </LabelBlock>
cha-yh/C2C-UI
src/Label/Label.tsx
TypeScript
TypeAliasDeclaration
export type LabelProps = { text: string; required?: boolean; /** Basic property: style */ style?: React.CSSProperties; /** Basic property: className */ className?: string; };
cha-yh/C2C-UI
src/Label/Label.tsx
TypeScript
ArrowFunction
() => { const fixture = recordedDataFacade( ReferenceRecordings.Scenarios.PivotTable.SingleMeasureWithRowAndColumnAttributes, DataViewFirstPage, ); it("should return an attributeSortItem", () => { expect(getSortItemByColId(fixture.result(), "a_1055", "asc")).toMatchSnapshot(); ...
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { expect(getSortItemByColId(fixture.result(), "a_1055", "asc")).toMatchSnapshot(); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { const originalSorts = [newAttributeAreaSort(ReferenceLdm.Product.Name, "desc")]; expect(getSortItemByColId(fixture.result(), "a_1055", "desc", originalSorts)).toEqual( newAttributeAreaSort(ReferenceLdm.Product.Name, "desc"), ); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { const originalSorts = [newAttributeAreaSort(ReferenceLdm.Product.Name, "asc")]; expect(getSortItemByColId(fixture.result(), "a_1055", "desc", originalSorts)).toEqual( newAttributeAreaSort(ReferenceLdm.Product.Name, "desc"), ); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { expect(getSortItemByColId(fixture.result(), "a_1086_460488-m_0", "asc")).toMatchSnapshot(); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { const fixture = recordedDataFacade( ReferenceRecordings.Scenarios.PivotTable.SingleMeasureWithRowAndColumnAttributes, DataViewFirstPage, ); it("should return sortItems for row attribute sort", () => { const sortModel: any[] = [ { colId: "a_1055",...
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { const sortModel: any[] = [ { colId: "a_1055", sort: "asc", }, ]; expect(getSortsFromModel(sortModel, fixture.result())).toMatchSnapshot(); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
() => { const sortModel: any[] = [ { colId: "a_1086_460488-m_0", sort: "asc", }, ]; expect(getSortsFromModel(sortModel, fixture.result())).toMatchSnapshot(); }
Pkingo/gooddata-ui-sdk
libs/sdk-ui-pivot/src/impl/tests/agGridSorting.test.ts
TypeScript
ArrowFunction
({ theme }) => theme.accents.positive.base
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
({ $show: show }) => (show ? "visible" : "hidden")
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
({ theme }) => theme.accents.negative.base
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
({ isAnalyticsView }) => (isAnalyticsView ? "9px" : "0")
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
( ask: number, bid: number, ratePrecision: number, pipsPosition: number, ) => ((ask - bid) * Math.pow(10, pipsPosition)).toFixed( ratePrecision - pipsPosition, )
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
(symbol: string) => getPrice$(symbol).pipe( withLatestFrom(getCurrencyPair$(symbol)), map( ([ { bid, ask, movementType, symbol }, { pipsPosition, ratePrecision }, ]) => { const spread = calculateSpread(ask, bid, ratePrecision, pipsPosition) return { spread, movemen...
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
([ { bid, ask, movementType, symbol }, { pipsPosition, ratePrecision }, ]) => { const spread = calculateSpread(ask, bid, ratePrecision, pipsPosition) return { spread, movementType, symbol } }
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
({ isAnalyticsView }) => { const { spread, movementType } = usePriceMovementData() const rfqState = useRfqState() if (rfqState?.quoteState && rfqState.rfqResponse) { const { price: { bid, ask }, currencyPair: { ratePrecision, pipsPosition }, } = rfqState.rfqResponse const spread = calcul...
iprado78/ReactiveTraderCloud
src/new-client/src/App/LiveRates/Tile/PriceMovement/PriceMovement.tsx
TypeScript
ArrowFunction
(data: unknown, ctx: ExecutionContext) => { const request = ctx.switchToHttp().getRequest(); return request.user; }
Anrunlu/runluCollector
server/apps/admin/src/decorators/current-user.decorator.ts
TypeScript
ArrowFunction
(): Plugin => ({ install: (app) => { app.component(COMPONENT_NAME, DataTable) } })
TomokiMiyauci/data-table
packages/vue/src/plugin.ts
TypeScript
ArrowFunction
(app) => { app.component(COMPONENT_NAME, DataTable) }
TomokiMiyauci/data-table
packages/vue/src/plugin.ts
TypeScript
ArrowFunction
(props?) => Default({ 'bx-dropdown': props, })
Fxztam/carbon-web-components
tests/spec/dropdown_spec.ts
TypeScript
ArrowFunction
(event: CustomEvent) => { event.preventDefault(); }
Fxztam/carbon-web-components
tests/spec/dropdown_spec.ts
TypeScript
ArrowFunction
(event: CustomEvent) => { expect(event.detail.item).toBe(document.body.querySelector('bx-dropdown-item[value="staging"]')); event.preventDefault(); }
Fxztam/carbon-web-components
tests/spec/dropdown_spec.ts
TypeScript
ArrowFunction
event => { event.preventDefault(); }
Fxztam/carbon-web-components
tests/spec/dropdown_spec.ts
TypeScript
ArrowFunction
(e) => e ? DepositMsgState.toJSON(e) : undefined
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
ArrowFunction
(e) => e ? WithdrawMsgState.toJSON(e) : undefined
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
ArrowFunction
(e) => e ? SwapMsgState.toJSON(e) : undefined
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
ArrowFunction
(e) => e ? PoolRecord.toJSON(e) : undefined
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
InterfaceDeclaration
/** record of the state of each pool after genesis export or import, used to check variables */ export interface PoolRecord { pool: Pool | undefined; poolMetadata: PoolMetadata | undefined; poolBatch: PoolBatch | undefined; depositMsgStates: DepositMsgState[]; withdrawMsgStates: WithdrawMsgState[]; swapMsgS...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
InterfaceDeclaration
/** GenesisState defines the liquidity module's genesis state. */ export interface GenesisState { /** params defines all the parameters of related to liquidity. */ params: Params | undefined; poolRecords: PoolRecord[]; }
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
TypeAliasDeclaration
type Builtin = Date | Function | Uint8Array | string | number | undefined;
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
encode(message: PoolRecord, writer: Writer = Writer.create()): Writer { if (message.pool !== undefined) { Pool.encode(message.pool, writer.uint32(10).fork()).ldelim(); } if (message.poolMetadata !== undefined) { PoolMetadata.encode( message.poolMetadata, writer.uint32(18).fork()...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
decode(input: Reader | Uint8Array, length?: number): PoolRecord { const reader = input instanceof Uint8Array ? new Reader(input) : input; let end = length === undefined ? reader.len : reader.pos + length; const message = { ...basePoolRecord } as PoolRecord; message.depositMsgStates = []; message.wi...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
fromJSON(object: any): PoolRecord { const message = { ...basePoolRecord } as PoolRecord; message.depositMsgStates = []; message.withdrawMsgStates = []; message.swapMsgStates = []; if (object.pool !== undefined && object.pool !== null) { message.pool = Pool.fromJSON(object.pool); } else { ...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
toJSON(message: PoolRecord): unknown { const obj: any = {}; message.pool !== undefined && (obj.pool = message.pool ? Pool.toJSON(message.pool) : undefined); message.poolMetadata !== undefined && (obj.poolMetadata = message.poolMetadata ? PoolMetadata.toJSON(message.poolMetadata) ...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
fromPartial(object: DeepPartial<PoolRecord>): PoolRecord { const message = { ...basePoolRecord } as PoolRecord; message.depositMsgStates = []; message.withdrawMsgStates = []; message.swapMsgStates = []; if (object.pool !== undefined && object.pool !== null) { message.pool = Pool.fromPartial(o...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
encode(message: GenesisState, writer: Writer = Writer.create()): Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } for (const v of message.poolRecords) { PoolRecord.encode(v!, writer.uint32(18).fork()).ldelim(); } return wri...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
decode(input: Reader | Uint8Array, length?: number): GenesisState { const reader = input instanceof Uint8Array ? new Reader(input) : input; let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseGenesisState } as GenesisState; message.poolRecords = []; while (re...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
fromJSON(object: any): GenesisState { const message = { ...baseGenesisState } as GenesisState; message.poolRecords = []; if (object.params !== undefined && object.params !== null) { message.params = Params.fromJSON(object.params); } else { message.params = undefined; } if (object.po...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
toJSON(message: GenesisState): unknown { const obj: any = {}; message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined); if (message.poolRecords) { obj.poolRecords = message.poolRecords.map((e) => e ? PoolRecord.toJSON(e) : undefined ...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript
MethodDeclaration
fromPartial(object: DeepPartial<GenesisState>): GenesisState { const message = { ...baseGenesisState } as GenesisState; message.poolRecords = []; if (object.params !== undefined && object.params !== null) { message.params = Params.fromPartial(object.params); } else { message.params = undefi...
Parabellum-io/liquidity
client/generated/tendermint/liquidity/tendermint.liquidity.v1beta1/module/types/tendermint/liquidity/v1beta1/genesis.ts
TypeScript