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 translateError(msg) { | |
var newErr = new Error(msg); // placed here to get correct stack | |
return e => { | |
newErr.originalError = e; | |
throw newErr; | |
} | |
} | |
async function asyncTask() { | |
const user = await UserModel.findById(1).catch(translateError('No user found')) |
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
#!/usr/bin/env runhaskell | |
{-| | |
Module : JoiFromTypeScript | |
Description : Converts TypeScript interface and type statements to Joi schema generators. | |
Copyright : monnef | |
Maintainer : [email protected] | |
Stability : experimental | |
= Dependencies |
It looks like there is a slightly more official way to do this facebook/create-react-app#476
Besides differences with Windows, importing from a symlink seems to break Jest. So probably better to use the NODE_PATH
method as described in the link above, rather than this.
So here's the problem, you're working in a file, let's say:
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
#!/usr/bin/python | |
# esptool imports | |
from __future__ import division, print_function | |
import argparse | |
import base64 | |
import binascii | |
import copy | |
import hashlib |
OlderNewer