-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dependencies #2
Changes from all commits
1767830
9ed6fae
3785bbf
9d1f978
ed6ed56
f19ea5f
a830a1d
0a941c6
0ee7c08
6efd529
6232edc
703eeeb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
node_modules | ||
build | ||
typings | ||
lib | ||
src/**/*.js | ||
example |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import * as ms from 'ms'; | ||
import ms = require('ms'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. かなしい |
||
import * as WebSocket from 'ws'; | ||
import {contains} from 'ramda'; | ||
/** | ||
|
@@ -78,7 +78,7 @@ export function makeSlackBotDriver(token: string, options?: makeBotDriverOptions | |
const pong$: O<Timestamp<{}>> = fromEvent(socket, 'pong') | ||
.timestamp(); | ||
|
||
const pingOutput$ = ping$.mapTo(() => socket.ping(null, {}, true)); | ||
const pingOutput$ = ping$.mapTo(() => socket.ping(null, true, true)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
const pongOutput$ = fromEvent(socket, 'ping').mapTo(() => socket.pong()); | ||
const terminateOutput$ = ping$.withLatestFrom(pong$, (ping, pong) => ping.timestamp - pong.timestamp) | ||
.filter(diff => diff > pingInterval * (pingRetryLimit - 0.5)) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import {where, is, pick, assoc} from 'ramda'; | ||
import {pick, assoc} from 'ramda'; | ||
|
||
export type Channel = { | ||
id: string; | ||
|
@@ -9,14 +9,16 @@ export type Channel = { | |
creator: string; | ||
} | ||
|
||
export const isChannel = where({ | ||
id: is(String), | ||
name: is(String), | ||
is_member: is(Boolean), | ||
is_archived: is(Boolean), | ||
created: is(Number), | ||
creator: is(String) | ||
}); | ||
export function isChannel(x: any): x is Channel { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
return typeof x === 'object' && | ||
x !== null && | ||
typeof x.id === 'string' && | ||
typeof x.name === 'string' && | ||
typeof x.is_member === 'boolean' && | ||
typeof x.is_archived === 'boolean' && | ||
typeof x.created === 'number' && | ||
typeof x.creator === 'string'; | ||
}; | ||
|
||
const channelKeyList: Array<keyof Channel> = [ | ||
'id', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,7 +53,7 @@ export function updateChannel(key: string, project: (x: Channel) => Channel): Ac | |
} | ||
|
||
export function deleteChannel(key: string): Action { | ||
return curryDel(key); | ||
return over(lensProp('channels'), curryDel(key)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここは元の実装がおかしかった疑惑がある. |
||
} | ||
|
||
export function updateUser(key: string, project: (x: User) => User): Action { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
"sourceMap": true | ||
}, | ||
"include": [ | ||
"src/**/*.ts", | ||
"typings/index.d.ts" | ||
"src/**/*.ts" | ||
] | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このあたりも今まで動いてたのが謎