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 * as React from 'react'; | |
import cx from 'classnames'; | |
import { | |
Popover, IPopoverProps, | |
PopoverInteractionKind, | |
Position | |
} from '@blueprintjs/core'; | |
import './NotifyPopover.scss'; | |
interface IProps extends IPopoverProps{ |
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
/** | |
* Make all properties in T optional | |
*/ | |
type Partial<T> = { | |
[P in keyof T]?: T[P]; | |
}; | |
/** | |
* Make all properties in T required | |
*/ |
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
module.exports = { | |
parser: 'babel-eslint', | |
"parserOptions": { | |
"ecmaVersion": 6, | |
"sourceType": "module", | |
"ecmaFeatures": { | |
"jsx": true, | |
"experimentalObjectRestSpread": true | |
} | |
}, |
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
/* Variadic Tuple Types (generic tuple with spread) */ | |
function tail<T extends any[]>(arr: readonly [any, ...T]) { | |
const [_ignored, ...rest] = arr; | |
return rest; | |
} | |
const myTuple = [1, 2, 3, 4] as const; | |
const myArray = ["hello", "world"]; |