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
http://cosketch.com/Rooms/tuitpmu | |
https://moqups.com/ -------- MOCKUPS | |
https://learnxinyminutes.com/docs/ru-ru/javascript-ru/ -------- JAVASCRIPT ЗА ПАРУ ЧАСОВ | |
PRODUCTIVITY APP | |
3 views | |
1 - month view |
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
function PrettyCalendar(e, t, n, r) { | |
if (typeof n == "undefined") n = false; | |
if (typeof r == "undefined") { | |
var i = new Array(7); | |
i[0] = "Sunday"; | |
i[1] = "Monday"; | |
i[2] = "Tuesday"; | |
i[3] = "Wednesday"; | |
i[4] = "Thursday"; | |
i[5] = "Friday"; |
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
[{"id":19821,"updated":19959,"labels":"drum and bass,live","name":"Krust - Intabeats Drum&Bass Show # Ministry of Sound [16.07.2013]","bitrate":"[128 kbps]","mood":null,"date":"2013-07-23","mp3":"http:\/\/mixes.bassblog.pro\/Krust-Intabeats_Drum_and_Bass_Show-2013-07-16.mp3","tracklist":"01 \/\/ Krust - Light Speed Thought\n\n02 \/\/ Need For Mirrors - Sea Slug\n\n03 \/\/ Detail & Tiiu - Days Go By\n\n04 \/\/ Craggz & Parallel - Nobody\n\n05 \/\/ Ed:it - Cargo Dub (Total Science Remix)\n\n06 \/\/ Survival - Hanout\n\n07 \/\/ Kolectiv - Dog Pad (Zero T Remix)\n\n08 \/\/ Break - Steam Train\n\n09 \/\/ Digital - Gee Gees\n\n10 \/\/ Gang Related - J.A.M\n\n11 \/\/ Kid Drama - One 6 Eight\n\n12 \/\/ Skeptical - Eyes Down\n\n13 \/\/ Heist - Step Out The Box\n\n14 \/\/ Krust - Transparency\n\n15 \/\/ Om Unit & Sam Binga - Triffidz\n\n16 \/\/ Krust - Monitor Your Thoughts\n\n17 \/\/ Benjamin One - Oi Stalker (VIP)\n\n18 \/\/ Om Unit & Sam Binga - Squares\n\n19 \/\/ Krust - The Mad Paradise\n\n20 \/\/ Krust - Bi Foot\ |
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
function thunk(payload) { | |
return function (dispatch) { | |
doSomething(payload) | |
return dispatch(someAction()) | |
}; | |
} |
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 {Action, ActionCreator, Dispatch} from 'redux' | |
import {ThunkAction} from 'redux-thunk' | |
const thunk: ActionCreator<ThunkAction<Action, IState, void>> = ( | |
payload: string | |
) => { | |
return (dispatch: Dispatch<IState>): Action => { | |
doSomething(payload) | |
return dispatch(someAction()) | |
} |
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 thunk = createThunk<State, Action, Payload>((dispatch, payload) => { | |
doSomething(payload) | |
return dispatch(someAction()) | |
}) |
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
function foo(arg?: number) { ... } | |
function foo(arg: number | undefined) { ... } |
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
class A { | |
constructor(); // Error: overload signature not compatible with impl | |
constructor(a: number | undefined) {} | |
} | |
class A { | |
constructor(); | |
constructor(a?: number) {} // this one works | |
} |
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
function foo<T>(arg: T) { | |
if (arg === undefined) | |
doThis() | |
else | |
doThat(arg) | |
} | |
// number | |
foo<number>(42) // OK | |
foo<number>() // ERROR: 1 argument expected |
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 OptionalSpread<T> = | |
T extends undefined | |
? [] | |
: [T] | |
function foo<T = undefined>(...args: OptionalSpread<T>){ | |
const arg = args[0] // Type of: T = undefined | |
if (arg === undefined) | |
doThis() |
OlderNewer