This file contains 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 { | |
AminoConverters, | |
AminoMsgUnjail, | |
AminoTypes, | |
SigningStargateClient, | |
StargateClient, | |
createDefaultAminoConverters, | |
defaultRegistryTypes, | |
makeMultisignedTxBytes, | |
} from "@cosmjs/stargate"; |
This file contains 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 path from "path"; | |
import fs from "fs"; | |
import { coins, pubkeyToAddress } from "@cosmjs/amino"; | |
import { fromHex, toBase64, toHex } from "@cosmjs/encoding"; | |
import { StargateClient } from "@cosmjs/stargate"; | |
import { encodePubkey, makeSignBytes } from "@cosmjs/proto-signing"; | |
import { EncodeObject, Registry, makeAuthInfoBytes, makeSignDoc } from "@cosmjs/proto-signing"; | |
import { sha256 } from "@cosmjs/crypto"; | |
import { FireblocksSDK, TransactionOperation, TransactionStatus } from "fireblocks-sdk"; | |
import { TxRaw } from "cosmjs-types/cosmos/tx/v1beta1/tx"; |
This file contains 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
{ | |
"name": "Tests against TS v3.9", | |
"version": "1.0.0", | |
"main": "index.js", | |
"license": "MIT", | |
"dependencies": { | |
"typescript": "^3.9.2" | |
} | |
} |
This file contains 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
/** | |
* @since 2.11.0 | |
*/ | |
import { URIS3, Kind3, URIS2, Kind2, URIS, Kind, URIS4, Kind4, HKT } from './HKT' | |
import * as R from './ReadonlyRecord' | |
import { Option, fromNullable, fromPredicate, some, Applicative as OptionApplicative } from './Option' | |
import { Either, right, left } from './Either' | |
import { Ord } from './Ord' | |
import { Ord as StringOrd } from './string' | |
import { Apply4, Apply3, Apply3C, Apply2, Apply2C, Apply1, Apply } from './Apply' |
This file contains 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 { sum } from 'fp-ts-std/Array'; | |
import * as A from 'fp-ts/Array'; | |
import { pipe } from 'fp-ts/function'; | |
import * as O from 'fp-ts/Option'; | |
import * as T from 'fp-ts/Tree'; | |
import React from 'react'; | |
// npm package name: fp-ts-tree-contrib ? | |
export const isLeaf = <A,>(tree: T.Tree<A>): boolean => tree.forest.length === 0 |
This file contains 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
const mapAll = <A, B>(vals: { | |
[K in NonNullable<keyof A>]: (val: A[K]) => B | |
}) => (a: A): { | |
[K in NonNullable<keyof A>]: B | |
} => { | |
const keys = Object.keys(a) as (NonNullable<keyof A> & string)[] | |
const mapped = fromFoldableMap( | |
S.getLastSemigroup<B>(), RA.readonlyArray | |
)( | |
keys, (key) => [key, vals[key](a[key])] |
This file contains 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 React from 'react' | |
import * as A from 'fp-ts/Array'; | |
const Table2 = <A,>({ | |
data, order, headerTitles, rowRenderer | |
}: { | |
data: A[] | |
order: NonNullable<keyof A>[] | |
headerTitles: { | |
[K in NonNullable<keyof A>]: string |
This file contains 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 { flow, pipe } from 'fp-ts/function'; | |
import * as E from 'fp-ts/Either' | |
import * as r from 'rxjs' | |
import * as ro from 'rxjs/operators' | |
import * as OB from 'fp-ts-rxjs/lib/Observable' | |
export const tryCatch = <E, A>( | |
onErr: (e: unknown) => E | |
): r.OperatorFunction<A, E.Either<E, A>> => flow( | |
OB.map(E.right), |
This file contains 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 { pipe } from 'fp-ts/pipeable' | |
import * as O from 'fp-ts/Option' | |
import * as Op from 'monocle-ts/lib/Optional' | |
import * as r from 'rxjs' | |
import * as ro from 'rxjs/operators' | |
import { createStore, applyMiddleware } from 'redux'; | |
import { createEpicMiddleware } from 'redux-observable'; | |
import React from 'react'; | |
import { Provider, useDispatch, useSelector } from 'react-redux'; | |
import { makeADT, ofType, ADTType } from '@morphic-ts/adt' |
This file contains 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 PrintAdverb<T> { | |
then: <TResult1>(o: ((value: T) => PrintAdverb<TResult1>)) => PrintAdverb<TResult1>; | |
absolutely?: string; | |
positively?: string; | |
veryvery?: string; | |
necessary?: string; | |
} | |
const pa: PrintAdverb<string> = { | |
then: <TResult1>(o: ((value: string) => PrintAdverb<TResult1>)) => o('3') | |
} |
NewerOlder