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
// Type definitions for workbox-sw 3.2 | |
// Project: https://github.com/GoogleChrome/workbox | |
// Definitions by: Frederik Wessberg <https://github.com/wessberg> | |
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | |
// TypeScript Version: 2.6 | |
/** | |
* ===== BroadcastCacheUpdate ===== | |
*/ |
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
/* withAttr.jsx */ | |
import React from 'react' | |
const withAttr = (Component) => ({attrs, ...props}) => <Component {...attrs} {...props} /> | |
export default withAttr | |
/* example.jsx */ | |
import React from 'react' |
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 repository = Symbol('repository') | |
class Dict { | |
constructor(props) { | |
if (typeof props !== 'object') { | |
throw new Error( | |
`Props must be an object, you passed ${typeof props} ${props}.` | |
) | |
} | |
Object.freeze(props) |
NewerOlder