This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface Functions { | |
| logout: (input: LogoutParams) => Promise<unknown> | |
| userDetails: (input: UserDetailsParams) => Promise<unknown> | |
| } | |
| interface State { | |
| user: unknown | |
| } | |
| interface LogoutParams {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type These e a | |
| = Both ( e, a ) | |
| | Left e | |
| | Right a | |
| map : (a -> b) -> These e a -> These e b | |
| map f t = | |
| bimap ( identity, f ) t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface QbWithSelection <T extends Record<string, any> = never, Return = T> { | |
| where: (condition: Partial<T>) => QueryBuilder<T, Return> | |
| join: <NT extends Record<string, any>>(tableName: string) => QueryBuilder<T & NT, Return> | |
| limit: (n: number) => QueryBuilder<T, Return> | |
| offset: (n: number) => QueryBuilder<T, Return> | |
| orderBy: <K extends keyof T>(columns: Array<K>, by: "ASC" | "DESC") => QueryBuilder<T, Return> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type TryADT <E, A> = | |
| | { readonly _tag: "success", readonly success: A } | |
| | { readonly _tag: "failure", readonly failure: E } | |
| const success = <E, A>(successValue: A): TryADT<E, A> => ({ _tag: "success", success: successValue }) | |
| const failure = <E, A>(failureValue: E): TryADT<E, A> => ({ _tag: "failure", failure: failureValue }) | |
| class Try<E = never, A = never> { | |
| internalValue!: TryADT<E, A> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Reader } from 'fp-ts/lib/Reader' | |
| import { Monad3 } from 'fp-ts/lib/Monad' | |
| import * as RD from "@devexperts/remote-data-ts" | |
| import * as T from "fp-ts/lib/Task" | |
| import { monadTaskRemoteData, TaskRemoteData, TRD } from "./TaskRemoteData" | |
| import { pipe, pipeable } from "fp-ts/lib/pipeable" | |
| import { sequenceT } from 'fp-ts/lib/Apply' | |
| declare module 'fp-ts/lib/HKT' { | |
| interface URItoKind3<R, E, A> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Reader } from 'fp-ts/lib/Reader' | |
| import { Monad3 } from 'fp-ts/lib/Monad' | |
| import * as RD from "@devexperts/remote-data-ts" | |
| import { getReaderM } from 'fp-ts/lib/ReaderT' | |
| import { pipeable } from "fp-ts/lib/pipeable" | |
| declare module 'fp-ts/lib/HKT' { | |
| interface URItoKind3<R, E, A> { | |
| ReaderRemoteData: ReaderRemoteData<R, E, A> | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Monad2 } from 'fp-ts/lib/Monad' | |
| import * as RD from "@devexperts/remote-data-ts" | |
| import * as T from "fp-ts/lib/Task" | |
| import * as TE from "fp-ts/lib/TaskEither" | |
| import * as E from "fp-ts/lib/Either" | |
| import { pipe, pipeable } from "fp-ts/lib/pipeable" | |
| import { sequenceT } from 'fp-ts/lib/Apply' | |
| declare module 'fp-ts/lib/HKT' { | |
| interface URItoKind2<E, A> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Port of [RemoteData](https://github.com/devexperts/remote-data-ts/blob/master/src/remote-data.ts) | |
| * | |
| * Represents a value of one of four possible types (a disjoint union) | |
| * An instance of [RemoteData] is either an instance of [Initial], [Pending], [Failure] or [Success] | |
| * | |
| * A common use of [RemoteData] is as an alternative to [Either] or [Option] supporting initial and pending states | |
| * | |
| * Note: [Initial], [Pending] and [Failure] are commonly called "Left" part. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.bepower.becharge.ui | |
| import android.os.Bundle | |
| import android.view.LayoutInflater | |
| import android.view.View | |
| import android.view.View.OnClickListener | |
| import android.view.ViewGroup | |
| import androidx.databinding.DataBindingUtil | |
| import androidx.databinding.ViewDataBinding | |
| import androidx.recyclerview.widget.DiffUtil |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getInstanceMethodNames (obj) { | |
| return Object | |
| .getOwnPropertyNames (Object.getPrototypeOf (obj)) | |
| .filter(name => (name !== 'constructor' && typeof obj[name] === 'function')); | |
| } | |
| function getInstanceStaticMethodNames (Class) { | |
| return Object.getOwnPropertyNames(Class) | |
| .filter(prop => typeof Class[prop] === "function"); | |
| } |
NewerOlder