It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
It's 2024. You should use tsup instead of this.
🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs
bundle
✨ .d.ts
bundle + type-checking
class FileUploadComponent extends Component{ | |
upload(){ | |
this.props.mutate({ | |
variables: { | |
id, | |
avatar: this.inputFile.files[0] //this is how you send file | |
} | |
}). | |
then(({data}) => { | |
console.log(data) |
TypeScript supports Pick
to allow you to get a "subset" object type of a given type, but there is no built-in Pick
for deeper nested fields.
If you have a function that takes a large object as argument, but you don't use all of its fields, you can use Pick
, Pick2
, Pick3
, etc to narrow down the input type to be only just what you need. This will make it easier to test your function, because when mocking the input object, you don't need to pass all fields of the "large" object.
in OS X 10.4 to macOS sierra 10.12 and maybe higher!
Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:
#!/bin/bash | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
Template.signup.events( | |
'submit form': (e,t) -> | |
# Prevent form from submitting. | |
e.preventDefault() | |
# Grab the user's details. | |
user = | |
email: t.find('[name="emailAddress"]').value | |
password: t.find('[name="password"]').value |
#!/bin/bash | |
# Setup and start Sauce Connect for your TravisCI build | |
# This script requires your .travis.yml to include the following two private env variables: | |
# SAUCE_USERNAME | |
# SAUCE_ACCESS_KEY | |
# Follow the steps at https://saucelabs.com/opensource/travis to set that up. | |
# | |
# Curl and run this script as part of your .travis.yml before_script section: | |
# before_script: |
#!/bin/bash | |
# Setup and start Sauce Connect for your TravisCI build | |
# This script requires your .travis.yml to include the following two private env variables: | |
# SAUCE_USERNAME | |
# SAUCE_ACCESS_KEY | |
# Follow the steps at https://saucelabs.com/opensource/travis to set that up. | |
# | |
# Curl and run this script as part of your .travis.yml before_script section: | |
# before_script: |
Drag from an existing node to add a new node or link. Click to select/deselect nodes/links. Hit the DELETE key to remove the selected node or link. Drag to pan. Scroll to zoom.
Built with D3.js.
function namespace(name) | |
{ | |
var namespaces = name.split("."); | |
var name = ""; | |
function getName(parent) | |
{ | |
if(namespaces.length > 0) | |
{ | |
name = namespaces.shift(); |