- Fix error parsing
- Add missing
yield
in thelogin
function
// Extracts the type of a property deeply nested in an object | |
// Example: DeepProperty<'foo[0].bar', { foo: Array<{ bar: { baz: string } }> }> === { baz: string } | |
export type PropertyType< | |
TModel extends Record<string, any>, | |
TPath extends string | |
> = TPath extends keyof TModel | |
? TModel[TPath] | |
: TPath extends `${infer Key}.${infer RemainingPath}` | |
? Key extends keyof TModel | |
? PropertyType<TModel[Key], RemainingPath> |
import { useRef, useEffect } from 'react' | |
function useUpdate(fn) { | |
const mounting = useRef(true) | |
useEffect(() => { | |
if (mounting.current) { | |
mounting.current = false | |
} else { | |
fn() | |
} |
import { useEffect } from 'react' | |
function useUnmount(fn) { | |
useEffect(() => fn, []) | |
} |
import { useEffect } from 'react' | |
function useMount(fn) { | |
useEffect(() => void fn(), []) | |
} |
* Player class | |
* @class | |
* @classdesc Construct a new player with an independent redux store | |
*/ | |
class Player { | |
/** | |
* Class constructor | |
*/ | |
constructor() { | |
/** |
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../paper-item/paper-item.html"> |