theme |
---|
./styles.json |
We have two options ahead, the first one is being trying replace babel with swc, the second one is to try to improve the current build process.
package cripto | |
import ( | |
"github.com/ethereum/go-ethereum/accounts" | |
"github.com/ethereum/go-ethereum/common/hexutil" | |
"github.com/ethereum/go-ethereum/crypto" | |
) | |
// from: https://gist.github.com/dcb9/385631846097e1f59e3cba3b1d42f3ed#file-eth_sign_verify-go | |
func VerifySig(from, sigHex string, msg []byte) bool { |
// Log error: | |
// ERROR: Unable to parse /Users/grubba/Desktop/work/meteor/meteor/packages/accounts-password/password_server.js: await is a reserved word (1133:39) | |
// ERROR: Unable to parse /Users/grubba/Desktop/work/meteor/meteor/packages/webapp/webapp_server.js: await is a reserved word (1496:0) | |
/// password_server.js: | |
async function __initAccountsIndexes() { | |
await Meteor.users.createIndexAsync( | |
"services.email.verificationTokens.token", | |
{ unique: true, sparse: true } |
class RetryError extends Error { | |
constructor(message, err) { | |
super(message); | |
this.kind = 'RetryError'; | |
// work here with the error | |
this.rawError = err; | |
} | |
} |
import { Meteor } from 'meteor/meteor'; | |
import { Mongo } from 'meteor/mongo'; | |
import { | |
useReducer, | |
useMemo, | |
useEffect, | |
Reducer, | |
DependencyList, | |
useRef, | |
} from 'react'; |
const cacheMap = new Map<string, Entry>() | |
interface Entry { | |
deps: EJSON[] | |
promise: Promise<unknown> | |
result?: unknown // here is what your T should be | |
error?: unknown | |
} | |
// you can use isEqual from lodash in this case | |
function arraysEqual<T>(a: T[], b: T[]): boolean { |
// server/server.js | |
Meteor.methods({ | |
'someMethod': async function() { | |
if (Meteor.isAsyncCall()) { | |
// here is a when a callAsync | |
} else { | |
// when is just call | |
} | |
return Meteor.isCallAsync(); | |
}) |
package main | |
import ( | |
"fmt" | |
md "github.com/JohannesKaufmann/html-to-markdown" | |
"github.com/PuerkitoBio/goquery" | |
"github.com/charmbracelet/glamour" | |
"log" | |
"net/http" | |
"os" |
const Module = { | |
value: 0, | |
someFn: () => { | |
return this.value; | |
}, | |
okayFn() { | |
return this.value; | |
} | |
} | |
class Module2 { |
type GetParams< | |
Text extends string, | |
Result extends string = '' | |
> = | |
Text extends `${ infer L }${ infer R }` | |
? L extends '/' | |
? Result | |
: GetParams<R, `${ Result }${ L }`> | |
: Result |