Skip to content

Commit

Permalink
tsconfig strict true
Browse files Browse the repository at this point in the history
- Set strict: true, noImplicitAny: false;
- Update some functions to use Promise instead of Observable.
- Remove chainMap operator
  • Loading branch information
Arlen22 committed May 28, 2019
1 parent 8587d5a commit d0c2944
Show file tree
Hide file tree
Showing 16 changed files with 544 additions and 327 deletions.
4 changes: 2 additions & 2 deletions lib/rx.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ export {
Observable, Subject, Subscription, BehaviorSubject, Subscriber, Observer, Scheduler, Operator
} from './Rx.min';
import './rxjs-operators/routeCase.add';
import './rxjs-operators/chainMap';
// import './rxjs-operators/chainMap';
//export { Observable, Subject, Subscription, BehaviorSubject, Subscriber, Observer, Scheduler };
4 changes: 2 additions & 2 deletions src/authRoute.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/authRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function handleAuthRoute(state: StateObject) {
else
state.respond(200).json({ pendingPin: getRandomPin() });
} else if (state.path[3] === "login") {
state.recieveBody(true).then(() => {
state.recieveBody(true, true).then(() => {
if (state.body.length && !state.json) return; //recieve body sent a response already
if (!state.body.length) return state.throwReason(400, "Empty request body");
/** [username, type, timestamp, hash, sig] */
Expand Down
4 changes: 2 additions & 2 deletions src/datafolder.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/datafolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function init(e: ServerEventEmitter) {
var result = resolvePath(pathname.split('/'), settings.tree) as PathResolverResult
if (!result) return client.close(404);

statWalkPath(result).subscribe(statPath => {
statWalkPath(result).then(statPath => {
//if this is a datafolder, we hand the client and request off directly to it
//otherwise we stick it in its own section
if (statPath.itemtype === "datafolder") {
Expand Down
2 changes: 1 addition & 1 deletion src/ipcalc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/ipcalc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
*/


export function IPv4_Address( addressDotQuad, netmaskBits ) {
export function IPv4_Address(this: any, addressDotQuad, netmaskBits ) {
var split = addressDotQuad.split( '.', 4 );
var byte1 = Math.max( 0, Math.min( 255, parseInt( split[0] ))); /* sanity check: valid values: = 0-255 */
var byte2 = Math.max( 0, Math.min( 255, parseInt( split[1] )));
Expand Down
Loading

0 comments on commit d0c2944

Please sign in to comment.