commit stringlengths 40 40 | old_file stringlengths 4 150 | new_file stringlengths 4 150 | old_contents stringlengths 0 3.26k | new_contents stringlengths 1 4.43k | subject stringlengths 15 501 | message stringlengths 15 4.06k | lang stringclasses 4
values | license stringclasses 13
values | repos stringlengths 5 91.5k | diff stringlengths 0 4.35k |
|---|---|---|---|---|---|---|---|---|---|---|
d8cad41e06aed8a79c708cd6067a8b57e5146387 | src/index.ts | src/index.ts | export type something = boolean|number|string|object
export const isArray = (x: any): x is Array<any> => Array.isArray(x)
export const isString = (x: any): x is string => typeof x === "string"
export const isNum = (x: any): x is number => typeof x === "number"
export const isBool = (x: any): x is boolean => typeof x =... | export type something = boolean|number|string|object
export const isArray = (x: any): x is Array<any> => Array.isArray(x)
export const isList = isArray
export const isString = (x: any): x is string => typeof x === "string"
export const isNum = (x: any): x is number => typeof x === "number"
export const isBool = (x: an... | Create immutable typings and constructors for native javascript objects and arrays | Create immutable typings and constructors for native javascript objects and arrays
| TypeScript | mit | bjoyx/power-belt,bjoyx/power-belt,bjoyx/power-belt | ---
+++
@@ -1,6 +1,7 @@
export type something = boolean|number|string|object
export const isArray = (x: any): x is Array<any> => Array.isArray(x)
+export const isList = isArray
export const isString = (x: any): x is string => typeof x === "string"
export const isNum = (x: any): x is number => typeof x === "numb... |
a16e761a644071a05f98b87c992be49856894fe4 | src/index.ts | src/index.ts | // import 'core-js'; (npm i -D core-js)
export * from './class-decorators';
export * from './method-decorators';
export * from './parameter-decorators';
export * from './property-decorators';
| // Polyfills
// import 'core-js'; (npm i -D core-js)
export * from './class-decorators';
export * from './method-decorators';
//export * from './parameter-decorators';
//export * from './property-decorators';
| Comment empty decorator folders (parameter & property) | Comment empty decorator folders (parameter & property)
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -1,6 +1,7 @@
+// Polyfills
// import 'core-js'; (npm i -D core-js)
export * from './class-decorators';
export * from './method-decorators';
-export * from './parameter-decorators';
-export * from './property-decorators';
+//export * from './parameter-decorators';
+//export * from './property-decorator... |
fea0dff895546ea3c041c5b4d9f52be30f1faf79 | src/main.tsx | src/main.tsx | import "core-js";
import { Dialog } from "material-ui";
import { Provider } from "mobx-react";
import * as OfflinePluginRuntime from "offline-plugin/runtime";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { App } from "./co... | import "core-js";
import { Dialog } from "material-ui";
import { Provider } from "mobx-react";
import * as OfflinePluginRuntime from "offline-plugin/runtime";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { App } from "./co... | Fix NODE_ENV source to env.ts | Fix NODE_ENV source to env.ts
| TypeScript | agpl-3.0 | anontown/client,anontown/client,anontown/client | ---
+++
@@ -7,13 +7,14 @@
import { BrowserRouter, Route, Switch } from "react-router-dom";
import { App } from "./components/app";
import * as dialogStyle from "./dialog.scss";
+import { PROD } from "./env";
import { stores } from "./stores";
(Dialog as any).defaultProps.className = dialogStyle.dialog;
(Dialo... |
293eed39c626eca5843307554836459ed99bb77e | src/app/Root.tsx | src/app/Root.tsx | import { withProfiler } from '@sentry/react';
import { HTML5Backend } from 'react-dnd-html5-backend';
import {
DndProvider,
MouseTransition,
MultiBackendOptions,
TouchTransition,
} from 'react-dnd-multi-backend';
import { TouchBackend } from 'react-dnd-touch-backend';
import { Provider } from 'react-redux';
imp... | import { withProfiler } from '@sentry/react';
import { HTML5Backend } from 'react-dnd-html5-backend';
import {
DndProvider,
MouseTransition,
MultiBackendOptions,
TouchTransition,
} from 'react-dnd-multi-backend';
import { TouchBackend } from 'react-dnd-touch-backend';
import { Provider } from 'react-redux';
imp... | Revert "Temp: try removing native drag and drop for iOS" | Revert "Temp: try removing native drag and drop for iOS"
This reverts commit 1e0336c65445331ade43e68de8dcbf31be9ffd97.
| TypeScript | mit | DestinyItemManager/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM,DestinyItemManager/DIM | ---
+++
@@ -11,31 +11,21 @@
import { BrowserRouter as Router } from 'react-router-dom';
import App from './App';
import store from './store/store';
-import { isiOSBrowser } from './utils/browsers';
// Wrap App with Sentry profiling
const WrappedApp = $featureFlags.sentry ? withProfiler(App) : App;
function ... |
50a508514f94b0de2c09026aabd3dedfbe3fd94a | app/src/lib/git/fetch.ts | app/src/lib/git/fetch.ts | import { git, envForAuthentication, expectedAuthenticationErrors } from './core'
import { Repository } from '../../models/repository'
import { User } from '../../models/user'
/** Fetch from the given remote. */
export async function fetch(repository: Repository, user: User | null, remote: string): Promise<void> {
co... | import { git, envForAuthentication, expectedAuthenticationErrors, GitError } from './core'
import { Repository } from '../../models/repository'
import { User } from '../../models/user'
/** Fetch from the given remote. */
export async function fetch(repository: Repository, user: User | null, remote: string): Promise<vo... | Revert "cleanup check and rethrow" | Revert "cleanup check and rethrow"
This reverts commit 3df56c32782f966e438da0c596357208b4e9bf9a.
| TypeScript | mit | BugTesterTest/desktops,artivilla/desktop,desktop/desktop,say25/desktop,artivilla/desktop,artivilla/desktop,shiftkey/desktop,hjobrien/desktop,j-f1/forked-desktop,BugTesterTest/desktops,gengjiawen/desktop,shiftkey/desktop,shiftkey/desktop,shiftkey/desktop,j-f1/forked-desktop,j-f1/forked-desktop,gengjiawen/desktop,artivil... | ---
+++
@@ -1,4 +1,4 @@
-import { git, envForAuthentication, expectedAuthenticationErrors } from './core'
+import { git, envForAuthentication, expectedAuthenticationErrors, GitError } from './core'
import { Repository } from '../../models/repository'
import { User } from '../../models/user'
@@ -10,7 +10,14 @@
... |
c9c7e8c7b19e0a8d73cd61beb9169d270913b102 | webpack/server/partials/plugins.ts | webpack/server/partials/plugins.ts | import * as webpack from 'webpack'
import * as Options from 'webpack/models/Options'
export const partial = (c: Options.Interface): webpack.Configuration => ({
plugins: [
// Ignore all files on the frontend.
new webpack.IgnorePlugin(/\.css$/),
new webpack.NormalModuleReplacementPlugin(/\.css$/, 'node-no... | import * as webpack from 'webpack'
import * as Options from 'webpack/models/Options'
export const partial = (c: Options.Interface): webpack.Configuration => ({
plugins: [
// Ignore all files on the frontend.
new webpack.IgnorePlugin(/\.css$/),
new webpack.NormalModuleReplacementPlugin(/\.css$/, 'node-noo... | Fix relative assets issue for non-root routes | Fix relative assets issue for non-root routes
| TypeScript | mit | devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity,devonzuegel/clarity | ---
+++
@@ -1,5 +1,4 @@
import * as webpack from 'webpack'
-
import * as Options from 'webpack/models/Options'
export const partial = (c: Options.Interface): webpack.Configuration => ({ |
c0a9f545d32b688c4e49aed649eebc8a804b4518 | lib/store/watch.ts | lib/store/watch.ts | import { TextEditor } from "atom";
import { action } from "mobx";
import OutputStore from "./output";
import { log } from "./../utils";
import type Kernel from "./../kernel";
export default class WatchStore {
kernel: Kernel;
editor: TextEditor;
outputStore = new OutputStore();
autocompleteDisposable: atom$Dispo... | import { TextEditor, Disposable } from "atom";
import { action } from "mobx";
import OutputStore from "./output";
import { log } from "./../utils";
import type Kernel from "./../kernel";
export default class WatchStore {
kernel: Kernel;
editor: TextEditor;
outputStore = new OutputStore();
autocompleteDisposable... | Replace atom$Disposable with imported Disposable | Replace atom$Disposable with imported Disposable
| TypeScript | mit | nteract/hydrogen,nteract/hydrogen | ---
+++
@@ -1,4 +1,4 @@
-import { TextEditor } from "atom";
+import { TextEditor, Disposable } from "atom";
import { action } from "mobx";
import OutputStore from "./output";
import { log } from "./../utils";
@@ -7,7 +7,7 @@
kernel: Kernel;
editor: TextEditor;
outputStore = new OutputStore();
- autocompl... |
aa7676b498204c3db94e116eed9fed8f0fe8c0fc | ui/analyse/src/explorer/explorerXhr.ts | ui/analyse/src/explorer/explorerXhr.ts | import { OpeningData, TablebaseData } from './interfaces';
export function opening(endpoint: string, variant: VariantKey, fen: Fen, config, withGames: boolean): JQueryPromise<OpeningData> {
let url: string;
const params: any = {
fen,
moves: 12
};
if (!withGames) params.topGames = params.recentGames = 0... | import { OpeningData, TablebaseData } from './interfaces';
export function opening(endpoint: string, variant: VariantKey, fen: Fen, config, withGames: boolean): JQueryPromise<OpeningData> {
let url: string;
const params: any = {
fen,
moves: 12
};
if (!withGames) params.topGames = params.recentGames = 0... | Revert "configure timeout for tablebase requests" | Revert "configure timeout for tablebase requests"
This reverts commit 6b3c63ebb73f92399a1ea1cd6a61fc6847d919fd.
| TypeScript | agpl-3.0 | luanlv/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,arex1337/lila,luanlv/lila | ---
+++
@@ -30,8 +30,7 @@
return $.ajax({
url: endpoint + '/' + effectiveVariant,
data: { fen },
- cache: true,
- timeout: 30
+ cache: true
}).then((data: Partial<TablebaseData>) => {
data.tablebase = true;
data.fen = fen; |
b6f8a264c9b3eb6f4f9a1b37e59f750a4a6df49e | js/components/portal-dashboard/all-responses-popup/popup-student-response-list.tsx | js/components/portal-dashboard/all-responses-popup/popup-student-response-list.tsx | import React from "react";
import { Map } from "immutable";
import Answer from "../../../containers/portal-dashboard/answer";
import { getFormattedStudentName } from "../../../util/student-utils";
import css from "../../../../css/portal-dashboard/all-responses-popup/popup-student-response-list.less";
interface IProps... | import React from "react";
import { Map } from "immutable";
import Answer from "../../../containers/portal-dashboard/answer";
import { getFormattedStudentName } from "../../../util/student-utils";
import css from "../../../../css/portal-dashboard/all-responses-popup/popup-student-response-list.less";
interface IProps... | Fix student name in modal popup | Fix student name in modal popup
| TypeScript | mit | concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report,concord-consortium/portal-report | ---
+++
@@ -6,7 +6,7 @@
import css from "../../../../css/portal-dashboard/all-responses-popup/popup-student-response-list.less";
interface IProps {
- students: any; // TODO: add type
+ students: Map<any, any>;
isAnonymous: boolean;
currentQuestion?: Map<string, any>;
}
@@ -18,12 +18,11 @@
<div cla... |
6583ce26dcd12605c8427966153fcf93194696f6 | common/predictive-text/worker/index.ts | common/predictive-text/worker/index.ts | // Dummy module for getting environment setup.
class MyWorker {
public hello() {
return 'hello';
}
}
// The technique below allows code to work both in-browser and in Node.
if(typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = new MyWorker();
} else {
//@... | // Dummy module for getting environment setup.
let EXPORTS = {
hello() {
return 'hello';
}
}
// The technique below allows code to work both in-browser and in Node.
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') {
module.exports = EXPORTS;
} else {
//@ts-ignore
... | Use an object instead of a new class instance. | Use an object instead of a new class instance.
| TypeScript | apache-2.0 | tavultesoft/keymanweb,tavultesoft/keymanweb | ---
+++
@@ -1,14 +1,14 @@
// Dummy module for getting environment setup.
-class MyWorker {
- public hello() {
+let EXPORTS = {
+ hello() {
return 'hello';
}
}
// The technique below allows code to work both in-browser and in Node.
-if(typeof module !== 'undefined' && typeof module.exports !==... |
88aff2cad6a42ef0ce64bead55216c262ac4efb9 | src/base/lang.ts | src/base/lang.ts | module Base {
export function randomString(length: number, chars: string) {
var result = '';
for (var i = length; i > 0; --i) {
result += chars[Math.round(Math.random() * (chars.length - 1))];
}
return result;
}
export var ALPHA_NUMERIC = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO... | module Base {
export function randomString(length: number, chars: string) {
var result = '';
for (var i = length; i > 0; --i) {
result += chars[Math.round(Math.random() * (chars.length - 1))];
}
return result;
}
export var ALPHA_NUMERIC = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNO... | Fix compilation error in demo | Fix compilation error in demo
| TypeScript | mit | ryankaplan/pattern-based-ot,ryankaplan/pattern-based-ot,ryankaplan/pattern-based-ot | ---
+++
@@ -16,7 +16,7 @@
}
export function allPairs(arr1:Array<any>, arr2:Array<any>) {
- let res: Array<Array<Char.Operation>> = [];
+ let res: Array<Array<any>> = [];
for (var first of arr1) {
for (var second of arr2) {
res.push([first, second]); |
fa3954495a077999121763ae55bb925aa27ea044 | packages/apollo-client/src/util/Observable.ts | packages/apollo-client/src/util/Observable.ts | // This simplified polyfill attempts to follow the ECMAScript Observable proposal.
// See https://github.com/zenparsing/es-observable
import { Observable as LinkObservable } from 'apollo-link';
export type Subscription = ZenObservable.Subscription;
export type Observer<T> = ZenObservable.Observer<T>;
import $$observa... | // This simplified polyfill attempts to follow the ECMAScript Observable proposal.
// See https://github.com/zenparsing/es-observable
import { Observable as LinkObservable } from 'apollo-link';
export type Subscription = ZenObservable.Subscription;
export type Observer<T> = ZenObservable.Observer<T>;
import $$observa... | Use @@observable in case rxjs was loaded before apollo | Use @@observable in case rxjs was loaded before apollo
| TypeScript | mit | apollographql/apollo-client,apollostack/apollo-client,apollostack/apollo-client,apollostack/apollo-client,apollographql/apollo-client | ---
+++
@@ -12,4 +12,8 @@
public [$$observable]() {
return this;
}
+
+ public ['@@observable']() {
+ return this;
+ }
} |
c893ea19ba5e6f62db95478e5b615d65f9b399a0 | src/app/core/animations.ts | src/app/core/animations.ts | import { trigger, state, transition, animate, style } from '@angular/animations';
export let slideAnimation = trigger('slide', [
// state('left', style({ transform: 'translateX(0)' })),
// state('right', style({ transform: 'translateX(-50%)' })),
transition('* => *', [
style({ transform: 'translateX... | import { trigger, state, transition, animate, style } from '@angular/animations';
export let slideAnimation = trigger('slide', [
transition('* => *', [
style({transform: 'translateX(-100%)'}),
animate('150ms ease-in', style({transform: 'translateX(0%)'}))
])
]) | Change animation on tab switching. | Change animation on tab switching.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -1,11 +1,8 @@
import { trigger, state, transition, animate, style } from '@angular/animations';
export let slideAnimation = trigger('slide', [
-
- // state('left', style({ transform: 'translateX(0)' })),
- // state('right', style({ transform: 'translateX(-50%)' })),
transition('* => *', [
- ... |
29ce204f305f33dcedf6ab87ae37da8eb981a00b | frontend/app/framework/angular/title.component.ts | frontend/app/framework/angular/title.component.ts | /*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
// tslint:disable: readonly-array
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Tit... | /*
* Squidex Headless CMS
*
* @license
* Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved.
*/
// tslint:disable: readonly-array
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Tit... | Fix build and circular dependency. | Fix build and circular dependency.
| TypeScript | mit | Squidex/squidex,Squidex/squidex,Squidex/squidex,Squidex/squidex,Squidex/squidex | ---
+++
@@ -9,8 +9,7 @@
import { ChangeDetectionStrategy, Component, Input, OnChanges, OnDestroy } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
-import { TitleService } from '@app/framework/internal';
-import { Types } from '@app/shared';
+import { TitleService, Types } from '@a... |
aed954e4e6e8beabd47268916ff0955fbb20682d | bin/src/run/alternateScreen.ts | bin/src/run/alternateScreen.ts | import ansiEscape from 'ansi-escapes';
import { stderr } from '../logging';
const SHOW_ALTERNATE_SCREEN = '\u001B[?1049h';
const HIDE_ALTERNATE_SCREEN = '\u001B[?1049l';
export default function alternateScreen (enabled: boolean) {
if (!enabled) {
let needAnnounce = true;
return {
open () { },
close () { },... | import ansiEscape from 'ansi-escapes';
import { stderr } from '../logging';
const SHOW_ALTERNATE_SCREEN = '\u001B[?1049h';
const HIDE_ALTERNATE_SCREEN = '\u001B[?1049l';
const isWindows = process.platform === 'win32';
const isMintty = isWindows && !!(process.env.SHELL || process.env.TERM);
const isConEmuAnsiOn = (pro... | Fix rollup watch crashes in cmd or powershell | Fix rollup watch crashes in cmd or powershell
| TypeScript | mit | corneliusweig/rollup | ---
+++
@@ -3,6 +3,11 @@
const SHOW_ALTERNATE_SCREEN = '\u001B[?1049h';
const HIDE_ALTERNATE_SCREEN = '\u001B[?1049l';
+
+const isWindows = process.platform === 'win32';
+const isMintty = isWindows && !!(process.env.SHELL || process.env.TERM);
+const isConEmuAnsiOn = (process.env.ConEmuANSI || '').toLowerCase() =... |
b5ffe6fef6bad333cbe7e3e08af7c3ea01ad292a | tests/cases/fourslash/callOrderDependence.ts | tests/cases/fourslash/callOrderDependence.ts | /// <reference path="fourslash.ts" />
/////**/
// Bug 768028
// FourSlash.currentTestState.enableIncrementalUpdateValidation = false;
edit.replace(0,0,"function foo(bar) {\n b\n}\n");
goTo.position(27);
FourSlash.currentTestState.getCompletionListAtCaret().entries
.forEach(entry =>
console.log(Four... | /// <reference path="fourslash.ts" />
/////**/
// Bug 768028
// FourSlash.currentTestState.enableIncrementalUpdateValidation = false;
edit.replace(0,0,"function foo(bar) {\n b\n}\n");
goTo.position(27);
FourSlash.currentTestState.getCompletionListAtCaret().entries
.forEach(entry => FourSlash.currentTest... | Remove console logging from test | Remove console logging from test
| TypeScript | apache-2.0 | popravich/typescript,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,hippich/typescript,hippich/typescript,hippich/typescript,mbebenita/shumway.ts,popravich/typescript,popravich/typescript,fdecampredon/jsx-typescript-old-version,mbebenita/shumway.ts | ---
+++
@@ -7,5 +7,4 @@
edit.replace(0,0,"function foo(bar) {\n b\n}\n");
goTo.position(27);
FourSlash.currentTestState.getCompletionListAtCaret().entries
- .forEach(entry =>
- console.log(FourSlash.currentTestState.getCompletionEntryDetails(entry.name)));
+ .forEach(entry => FourSlash.currentTestState.get... |
58942d704d0794fbf2221f73e53d9cf5a79e5adc | src/main/cpu.ts | src/main/cpu.ts | export class CPU {
registers: number[] = new Array(16).fill(0);
I = 0;
get V0() { return this.registers[0x0]; }
get V1() { return this.registers[0x1]; }
get V2() { return this.registers[0x2]; }
get V3() { return this.registers[0x3]; }
get V4() { return this.registers[0x4]; }
get V5() {... | export class CPU {
registers: number[] = new Array(16).fill(0);
I = 0;
get V0() { return this.registers[0x0]; }
get V1() { return this.registers[0x1]; }
get V2() { return this.registers[0x2]; }
get V3() { return this.registers[0x3]; }
get V4() { return this.registers[0x4]; }
get V5() {... | Refactor de CPU.execute avec un switch | Refactor de CPU.execute avec un switch
| TypeScript | unlicense | cybrown/chip8,cybrown/chip8 | ---
+++
@@ -21,8 +21,13 @@
get VF() { return this.registers[0xF]; }
execute(opcode: number): CPU {
- const registerIndex = ((opcode & 0x0F00) >> 8);
- this.registers[registerIndex] = opcode & 0xFF;
+ const firstRegisterIndex = ((opcode & 0x0F00) >> 8);
+ const constValue = opco... |
7958f45d24461ea0ded4e87a5d3a0b5509b2681b | source/services/timezone/timezone.service.tests.ts | source/services/timezone/timezone.service.tests.ts | import { timezone } from './timezone.service';
import { defaultFormats } from '../date/date.module';
import * as moment from 'moment';
import 'moment-timezone';
describe('timezone', (): void => {
it('should return the timezone', (): void => {
let date: moment.Moment = moment('2016-4-1T12:00:00-07:00', defaultForma... | import { timezone } from './timezone.service';
import { defaultFormats } from '../date/date.module';
import * as moment from 'moment';
import 'moment-timezone';
describe('timezone', (): void => {
it('should return the timezone', (): void => {
let date: moment.Moment = moment('2016-4-1T12:00:00-07:00', defaultForma... | Verify that moment handles daylight savings time correctly. We can just pass a consistent timezone offset to the client and let moment handle daylight savings time internally. | Verify that moment handles daylight savings time correctly. We can just pass a consistent timezone offset to the client and let moment handle daylight savings time internally.
| TypeScript | mit | RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | ---
+++
@@ -9,4 +9,11 @@
let date: moment.Moment = moment('2016-4-1T12:00:00-07:00', defaultFormats.isoFormat).tz('America/Los_Angeles');
expect(timezone.getTimezone(date)).to.equal('-07:00');
});
+
+ it('should handle daylight savings time', (): void => {
+ let dateWithoutDaylightSavings: moment.Moment = mo... |
b74a4beb3e682a4e9bd69595a7293430bc1186d5 | src/components/PlayerAudio.tsx | src/components/PlayerAudio.tsx | import React from 'react';
interface IProps {
stream: string;
userState: any; // todo
onChange: any;
}
class PlayerAudio extends React.Component<IProps> {
private audioEl: any;
componentWillUpdate(nextProps: IProps) {
const { userState } = this.props;
if (nextProps.userState !== userState) {
... | import React from 'react';
interface IProps {
stream: string;
userState: any; // todo
onChange: any;
}
interface IState {
cacheKey: number
}
class PlayerAudio extends React.Component<IProps, IState> {
private audioEl: any;
constructor(props: IProps) {
super(props);
this.state = {
cacheKey... | Fix FireFox audio caching issue | Fix FireFox audio caching issue
| TypeScript | mit | urfonline/frontend,urfonline/frontend,urfonline/frontend | ---
+++
@@ -6,8 +6,20 @@
onChange: any;
}
-class PlayerAudio extends React.Component<IProps> {
+interface IState {
+ cacheKey: number
+}
+
+class PlayerAudio extends React.Component<IProps, IState> {
private audioEl: any;
+
+ constructor(props: IProps) {
+ super(props);
+
+ this.state = {
+ cach... |
cb700d0bf01a426c261f9cb873230cb7502ca5ee | src/utils/index.ts | src/utils/index.ts | import { Grid, Row, Column, Diagonal } from '../definitions';
export function getRows(grid: Grid): Row[] {
const length = Math.sqrt(grid.length);
const copy = grid.concat([]);
return getArray(length).map(() => copy.splice(0, length));
}
export function getColumns(grid: Grid): Column[] {
return getRows(transpo... | import { Grid, Row, Column, Diagonal } from '../definitions';
export function getRows(grid: Grid): Row[] {
const size = Math.sqrt(grid.length);
const copy = grid.concat([]);
return getArray(size).map(() => copy.splice(0, size));
}
export function getColumns(grid: Grid): Column[] {
return getRows(transpose(gri... | Rename local variable length to size | Rename local variable length to size
| TypeScript | mit | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | ---
+++
@@ -1,9 +1,9 @@
import { Grid, Row, Column, Diagonal } from '../definitions';
export function getRows(grid: Grid): Row[] {
- const length = Math.sqrt(grid.length);
+ const size = Math.sqrt(grid.length);
const copy = grid.concat([]);
- return getArray(length).map(() => copy.splice(0, length));
+ ret... |
424dc0ec03c79e978b8f4bbd192f16ab0bd69236 | types/p-defer/p-defer-tests.ts | types/p-defer/p-defer-tests.ts | import pDefer = require('p-defer');
function delay(deferred: pDefer.DeferredPromise<string>, ms: number) {
setTimeout(deferred.resolve, ms, '🦄');
return deferred.promise;
}
let s: string;
async function f() { s = await delay(pDefer<string>(), 100); }
| import pDefer = require('p-defer');
function delay(deferred: pDefer.DeferredPromise<string>, ms: number) {
setTimeout(deferred.resolve, ms, '🦄');
return deferred.promise;
}
let s: string;
async function f() { s = await delay(pDefer<string>(), 100); }
async function u() {
const u: Promise<any> = pDefer().r... | Test for calling p-defer's resolve without any arguments | Test for calling p-defer's resolve without any arguments | TypeScript | mit | magny/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyp... | ---
+++
@@ -7,3 +7,7 @@
let s: string;
async function f() { s = await delay(pDefer<string>(), 100); }
+
+async function u() {
+ const u: Promise<any> = pDefer().resolve();
+} |
d5c48ee05303f9b3759ea8665d78a2132a50894f | tests/__tests__/synthetic-default-imports.spec.ts | tests/__tests__/synthetic-default-imports.spec.ts | import runJest from '../__helpers__/runJest';
describe('synthetic default imports', () => {
it('should not work when the compiler option is false', () => {
const result = runJest('../no-synthetic-default', ['--no-cache']);
const stderr = result.stderr.toString();
expect(result.status).toBe(1);
expe... | import runJest from '../__helpers__/runJest';
describe('synthetic default imports', () => {
it('should not work when the compiler option is false', () => {
const result = runJest('../no-synthetic-default', ['--no-cache']);
const stderr = result.stderr.toString();
expect(result.status).toBe(1);
expe... | Remove the column number from the check | Remove the column number from the check | TypeScript | mit | kulshekhar/ts-jest,kulshekhar/ts-jest | ---
+++
@@ -10,7 +10,7 @@
expect(stderr).toContain(
`TypeError: Cannot read property 'someExport' of undefined`,
);
- expect(stderr).toContain('module.test.ts:6:15');
+ expect(stderr).toContain('module.test.ts:6');
});
it('should work when the compiler option is true', () => { |
c541c4fae74193cf66f64ab148cf69824b487f9e | lib/utils/remoteable.ts | lib/utils/remoteable.ts | import {SupertypeSession, SupertypeLogger} from 'supertype';
import {Persistor} from 'Persistor';
type Constructable<BC> = new (...args: any[]) => BC;
export class AmorphicSession extends SupertypeSession {
connectSession : any
withoutChangeTracking (callback : Function) {};
config : any;
}
export class am... | import {SupertypeSession, SupertypeLogger} from 'supertype';
import {Persistor} from 'Persistor';
type Constructable<BC> = new (...args: any[]) => BC;
export class AmorphicSession extends SupertypeSession {
connectSession : any
withoutChangeTracking (callback : Function) {};
config : any;
}
export class am... | Add __dictionary__ to amorphicStatic's definition | Add __dictionary__ to amorphicStatic's definition
| TypeScript | mit | selsamman/amorphic,hackerrdave/amorphic,selsamman/amorphic,hackerrdave/amorphic,selsamman/amorphic,hackerrdave/amorphic,hackerrdave/amorphic,selsamman/amorphic | ---
+++
@@ -17,7 +17,8 @@
static end (persistorTransaction?, logger?) : any {};
static commit (options?) : any {};
static createTransientObject(callback : any) : any {};
- static __transient__ : any
+ static __transient__ : any;
+ static __dictionary__: any;
}
export function Remoteable<BC... |
8f54f5ec16948dbc1e176a6217b50504889e1593 | src/reducers/audioSettings.ts | src/reducers/audioSettings.ts | import { ChangeVolume, ToggleAudioEnabled } from '../actions/audio';
import { AudioSettings } from '../types';
import { CHANGE_VOLUME, TOGGLE_AUDIO_ENABLED } from '../constants';
const initial: AudioSettings = {
enabled: true,
volume: 0.1
};
type AudioAction = ChangeVolume | ToggleAudioEnabled;
export... | import { ChangeVolume, ToggleAudioEnabled } from '../actions/audio';
import { AudioSettings } from '../types';
import { CHANGE_VOLUME, TOGGLE_AUDIO_ENABLED } from '../constants';
const initial: AudioSettings = {
enabled: true,
volume: 0.1
};
type AudioAction = ChangeVolume | ToggleAudioEnabled;
export... | Fix bug causing audio to not toggle. | Fix bug causing audio to not toggle.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -19,7 +19,7 @@
case TOGGLE_AUDIO_ENABLED:
return {
...state,
- enabled: state.enabled
+ enabled: !state.enabled
};
default:
return state; |
cf2de4bb4b800ef707c7e0f4c47317fc53a7eea4 | packages/services/src/settings/index.ts | packages/services/src/settings/index.ts | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
export
namespace Settings {
}
| // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import {
ISettingRegistry, URLExt
} from '@jupyterlab/coreutils';
import {
JSONObject
} from '@phosphor/coreutils';
import {
ServerConnection
} from '..';
/**
* The url for the lab settings service.
*/
co... | Create `SettingService` with `fetch` and `save` methods. | Create `SettingService` with `fetch` and `save` methods.
| TypeScript | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | ---
+++
@@ -1,8 +1,97 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
+import {
+ ISettingRegistry, URLExt
+} from '@jupyterlab/coreutils';
+import {
+ JSONObject
+} from '@phosphor/coreutils';
+
+import {
+ ServerConnection
+} from '..';
+
+
+/**
+ *... |
025bbf37c6c2ebf1539e828ccf241ea746a7bf5a | app/src/main-process/menu/menu-ids.ts | app/src/main-process/menu/menu-ids.ts | export type MenuIDs =
'rename-branch' |
'delete-branch' |
'check-for-updates' |
'checking-for-updates' |
'downloading-update' |
'quit-and-install-update' |
'preferences' |
'update-branch' |
'merge-branch' |
'view-repository-on-github' |
'compare-branch' |
'open-in-shell' | export type MenuIDs =
'rename-branch' |
'delete-branch' |
'check-for-updates' |
'checking-for-updates' |
'downloading-update' |
'quit-and-install-update' |
'preferences' |
'update-branch' |
'merge-branch' |
'view-repository-on-github' |
'compare-branch' |
'open-in-shell'
| Add new line to end of file | Add new line to end of file
| TypeScript | mit | shiftkey/desktop,say25/desktop,kactus-io/kactus,hjobrien/desktop,say25/desktop,j-f1/forked-desktop,hjobrien/desktop,gengjiawen/desktop,shiftkey/desktop,hjobrien/desktop,shiftkey/desktop,desktop/desktop,gengjiawen/desktop,gengjiawen/desktop,desktop/desktop,BugTesterTest/desktops,BugTesterTest/desktops,say25/desktop,shif... | |
47d9cc85bd2176782fa7b450cb5cf03d645d9c31 | src/services/db-connection.service.ts | src/services/db-connection.service.ts | import PouchDB from 'pouchdb';
import { Injectable } from "@angular/core";
// Manages to connection to local and remote databases,
// creates per-user databases if needed.
@Injectable()
export class DbConnectionService {
public pagesDb: PouchDB.Database<{}>;
public eventsDb: PouchDB.Database<{}>;
public onLogi... | import PouchDB from 'pouchdb';
import { Injectable } from "@angular/core";
// Manages to connection to local and remote databases,
// creates per-user databases if needed.
@Injectable()
export class DbConnectionService {
public pagesDb: PouchDB.Database<{}>;
public eventsDb: PouchDB.Database<{}>;
public onLogi... | Use our own CouchDB server instead of Cloudant | Use our own CouchDB server instead of Cloudant
| TypeScript | apache-2.0 | sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile | ---
+++
@@ -10,8 +10,8 @@
public eventsDb: PouchDB.Database<{}>;
public onLogin(username: string) {
- this.pagesDb = this.setupLocalAndRemoteDb(username, "pages");
- this.eventsDb = this.setupLocalAndRemoteDb(username, "events");
+ this.pagesDb = this.setupLocalAndRemoteDb(username, "pages-dev");
+ ... |
c93770a6c1779af44b9786688b88688836b4f941 | packages/mobile/src/index.ts | packages/mobile/src/index.ts | try {
// tslint:disable-next-line
const modules = require('.').default;
modules.triggerOnAppCreate();
} catch (e) {
if (typeof ErrorUtils !== 'undefined') {
(ErrorUtils as any).reportFatalError(e);
} else {
console.error(e);
}
}
| try {
// tslint:disable-next-line
const modules = require('./modules').default;
modules.triggerOnAppCreate();
} catch (e) {
if (typeof ErrorUtils !== 'undefined') {
(ErrorUtils as any).reportFatalError(e);
} else {
console.error(e);
}
}
| Fix wrong path to modules for mobile | Fix wrong path to modules for mobile
| TypeScript | mit | sysgears/apollo-universal-starter-kit,sysgears/apollo-fullstack-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit,sysgears/apollo-universal-starter-kit | ---
+++
@@ -1,6 +1,6 @@
try {
// tslint:disable-next-line
- const modules = require('.').default;
+ const modules = require('./modules').default;
modules.triggerOnAppCreate();
} catch (e) {
if (typeof ErrorUtils !== 'undefined') { |
00b19d9516cf49549601234c959c2846bc1aec65 | apps/angular-thirty-seconds/src/app/angular-thirty-seconds/angular-thirty-seconds-routing.module.ts | apps/angular-thirty-seconds/src/app/angular-thirty-seconds/angular-thirty-seconds-routing.module.ts | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { CreateSnippetComponent } from './create-snippet/create-snippet.component';
import { AngularThirtySecondsComponent } from './angular-thirty-seconds.component';
const routes: Routes = [
{path: '', component: Angu... | import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { CreateSnippetComponent } from './create-snippet/create-snippet.component';
import { AngularThirtySecondsComponent } from './angular-thirty-seconds.component';
import { SlidesRoutes } from '@codelab/slides/src/lib/routing/... | Fix - returned routing to snippet component | Fix - returned routing to snippet component
| TypeScript | apache-2.0 | nycJSorg/angular-presentation,nycJSorg/angular-presentation,nycJSorg/angular-presentation | ---
+++
@@ -1,15 +1,18 @@
import { NgModule } from '@angular/core';
-import { Routes, RouterModule } from '@angular/router';
+import { RouterModule } from '@angular/router';
import { CreateSnippetComponent } from './create-snippet/create-snippet.component';
import { AngularThirtySecondsComponent } from './angular-... |
639af73bb73b12c7c52b99b0c5b5666b09fbc1ee | src/generic_ui/polymer/roster.ts | src/generic_ui/polymer/roster.ts | /// <reference path='../../interfaces/ui-polymer.d.ts' />
Polymer({
model: model,
onlineTrustedUproxyContacts: model.contacts.onlineTrustedUproxy,
offlineTrustedUproxyContacts: model.contacts.offlineTrustedUproxy,
onlineUntrustedUproxyContacts: model.contacts.onlineUntrustedUproxy,
offlineUntrustedUproxyCont... | /// <reference path='../../interfaces/ui-polymer.d.ts' />
Polymer({
model: model,
onlineTrustedUproxyContacts: model.contacts.onlineTrustedUproxy,
offlineTrustedUproxyContacts: model.contacts.offlineTrustedUproxy,
onlineUntrustedUproxyContacts: model.contacts.onlineUntrustedUproxy,
offlineUntrustedUproxyCont... | Remove reference to sharing status. | Remove reference to sharing status.
| TypeScript | apache-2.0 | roceys/uproxy,jpevarnek/uproxy,jpevarnek/uproxy,roceys/uproxy,chinarustin/uproxy,MinFu/uproxy,jpevarnek/uproxy,dhkong88/uproxy,dhkong88/uproxy,itplanes/uproxy,qida/uproxy,uProxy/uproxy,roceys/uproxy,IveWong/uproxy,IveWong/uproxy,uProxy/uproxy,dhkong88/uproxy,chinarustin/uproxy,qida/uproxy,MinFu/uproxy,MinFu/uproxy,itpl... | ---
+++
@@ -9,7 +9,6 @@
onlineNonUproxyContacts: model.contacts.onlineNonUproxy,
offlineNonUproxyContacts: model.contacts.offlineNonUproxy,
toggleSharing: function() {
- model.globalSettings.sharing = !this.model.globalSettings.sharing;
core.updateGlobalSettings({newSettings:model.globalSettings,
... |
9c38e9c0c66fe371fcabe419569f0d23511793cb | src/components/sources/sourceManager.ts | src/components/sources/sourceManager.ts | import { ENABLE_DEBUG_MODE } from '../../config/config'
import { log } from '../../lib/logger'
/**
* Create an array of all sources in the room and update job entries where
* available. This should ensure that each room has 1 harvester per source.
*
* @export
* @param {Room} room The current room.
*/
export func... | import { ENABLE_DEBUG_MODE } from '../../config/config'
import { blacklistedSources } from '../../config/jobs'
import { log } from '../../lib/logger'
/**
* Create an array of all sources in the room and update job entries where
* available. This should ensure that each room has 1 harvester per source.
*
* @export
... | Add option to filter out blacklisted sources | [SourceManager] Add option to filter out blacklisted sources
| TypeScript | mit | resir014/screeps,resir014/screeps | ---
+++
@@ -1,4 +1,5 @@
import { ENABLE_DEBUG_MODE } from '../../config/config'
+import { blacklistedSources } from '../../config/jobs'
import { log } from '../../lib/logger'
/**
@@ -13,15 +14,21 @@
if (room.memory.sources.length === 0) {
sources.forEach((source: Source) => {
- // Create an array ... |
75566f709d6c6b7ba9a2098fe36a8ef90d5a9bc1 | components/backdrop/backdrop.service.ts | components/backdrop/backdrop.service.ts | import { AppBackdrop } from './backdrop';
export class Backdrop
{
private static backdrops: AppBackdrop[] = [];
static push()
{
const el = document.createElement( 'div' );
document.body.appendChild( el );
const backdrop = new AppBackdrop();
backdrop.$mount( el );
this.backdrops.push( backdrop );
ret... | import { AppBackdrop } from './backdrop';
export class Backdrop
{
private static backdrops: AppBackdrop[] = [];
static push( context?: HTMLElement )
{
const el = document.createElement( 'div' );
if ( !context ) {
document.body.appendChild( el );
}
else {
context.appendChild( el );
}
const backd... | Allow to attach backdrops to elements other than window. | Allow to attach backdrops to elements other than window.
| TypeScript | mit | gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib,gamejolt/frontend-lib | ---
+++
@@ -4,10 +4,16 @@
{
private static backdrops: AppBackdrop[] = [];
- static push()
+ static push( context?: HTMLElement )
{
const el = document.createElement( 'div' );
- document.body.appendChild( el );
+
+ if ( !context ) {
+ document.body.appendChild( el );
+ }
+ else {
+ context.appendChil... |
d4c16858ce0ef2c22f084eecd2f142d9864ac8dd | lib/util/request.ts | lib/util/request.ts | import * as requestPromise from 'request-promise-native';
import { Config, Request, TaxjarError } from '../util/types';
const proxyError = (result): never => {
throw new TaxjarError(
result.error.error,
result.error.detail,
result.statusCode,
);
};
export default (config: Config): Request => {
const... | import * as requestPromise from 'request-promise-native';
import { Config, Request, TaxjarError } from '../util/types';
const proxyError = (result): never => {
const isTaxjarError = result.statusCode && result.error && result.error.error && result.error.detail;
if (isTaxjarError) {
throw new TaxjarError(
... | Check if an error is from the API before converting to a TaxjarError | Check if an error is from the API before converting to a TaxjarError
| TypeScript | mit | taxjar/taxjar-node,taxjar/taxjar-node | ---
+++
@@ -2,11 +2,15 @@
import { Config, Request, TaxjarError } from '../util/types';
const proxyError = (result): never => {
- throw new TaxjarError(
- result.error.error,
- result.error.detail,
- result.statusCode,
- );
+ const isTaxjarError = result.statusCode && result.error && result.error.erro... |
56e5c10c538645b6d03d2e002de25d93cba3dbc1 | Web/typescript/dropdown.component.ts | Web/typescript/dropdown.component.ts | import {Component, EventEmitter, Input, Output} from 'angular2/core';
import {SelectableOption} from './soapy.interfaces';
import * as util from './soapy.utils';
@Component({
selector: 'soapy-dropdown',
templateUrl: '/app/dropdown.component.html',
})
export class DropdownComponent {
@Input() items: SelectableO... | import {Component, EventEmitter, Input, Output} from 'angular2/core';
import {SelectableOption} from './soapy.interfaces';
import * as util from './soapy.utils';
@Component({
selector: 'soapy-dropdown',
templateUrl: '/app/dropdown.component.html',
})
export class DropdownComponent {
@Input() items: SelectableO... | Use correct typescript 'string' type (not 'String'). | Web: Use correct typescript 'string' type (not 'String').
| TypeScript | mit | dag10/Soapy,dag10/Soapy,dag10/Soapy,dag10/Soapy,dag10/Soapy | ---
+++
@@ -13,7 +13,7 @@
@Input() selectedItem: SelectableOption;
@Output() selectedItemChange = new EventEmitter();
- get selectedItemId(): String {
+ get selectedItemId(): string {
if (this.selectedItem == null) {
return null;
}
@@ -21,7 +21,7 @@
return this.selectedItem.id;
}
... |
4cb96edfec89f243aea063bb09ebdfb8b173fc3c | src/app/core/errorhandler/error-handler.service.ts | src/app/core/errorhandler/error-handler.service.ts | import {Injectable, ErrorHandler} from '@angular/core';
import {Response} from "@angular/http";
import {Observable} from "rxjs";
@Injectable()
export class ErrorHandlerService implements ErrorHandler {
constructor() { }
/*
* @description: handler for http-request catch-clauses
*/
handleError(error: Respo... | import {Injectable, ErrorHandler} from '@angular/core';
import {Response} from "@angular/http";
import {Observable} from "rxjs";
@Injectable()
export class ErrorHandlerService implements ErrorHandler {
constructor() { }
/*
* @description: handler for http-request catch-clauses
*/
handleError(error: Respo... | Handle errors as plain text | Handle errors as plain text
| TypeScript | mit | chipster/chipster-web,chipster/chipster-web,chipster/chipster-web | ---
+++
@@ -14,9 +14,10 @@
let errorMessage: string;
if (error instanceof Response) {
- const body = error.json() || '';
- const err = body.error || JSON.stringify(body);
- errorMessage = `${error.status} - ${error.statusText || ''} ${err}`;
+ //const body = error.json() || '';
+ ... |
b6b463f7043dac15a427952be76c2890cb5b844c | src/app/app.routing.ts | src/app/app.routing.ts | import { Routes, RouterModule } from '@angular/router';
import { HomepageComponent } from './homepage/homepage.component';
import { LoginComponent } from './profile/login/login.component';
import { SignUpComponent } from './profile/sign-up/sign-up.component';
import { UserProfileComponent } from './profile/user-profil... | import { Routes, RouterModule } from '@angular/router';
import { HomepageComponent } from './homepage/homepage.component';
import { LoginComponent } from './profile/login/login.component';
import { SignUpComponent } from './profile/sign-up/sign-up.component';
import { UserProfileComponent } from './profile/user-profil... | Add public snippets route. Add snippet by id route | Add public snippets route. Add snippet by id route
| TypeScript | apache-2.0 | SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend,SamuelM333/snippet-sniper-frontend | ---
+++
@@ -6,6 +6,7 @@
import { UserProfileComponent } from './profile/user-profile/user-profile.component';
import { SnippetEditorComponent } from './snippets/snippet-editor/snippet-editor.component';
import { SnippetViewerComponent } from './snippets/snippet-viewer/snippet-viewer.component';
+import { PublicSni... |
aca3de76affa8babd77f81a1f4858b8181a2f87f | src/components/HistorySideBar.tsx | src/components/HistorySideBar.tsx | import { PastCommitNode } from "./PastCommitNode";
import { SingleCommitInfo, GitBranchResult } from "../git";
import {
historySideBarStyle,
} from "../componentsStyle/HistorySideBarStyle";
import * as React from "react";
/** Interface for PastCommits component props */
export interface IHistorySideBarProps {
... | import { PastCommitNode } from "./PastCommitNode";
import { SingleCommitInfo, GitBranchResult } from "../git";
import {
historySideBarStyle,
} from "../componentsStyle/HistorySideBarStyle";
import * as React from "react";
/** Interface for PastCommits component props */
export interface IHistorySideBarProps {
... | Remove unused state in history side bar | Remove unused state in history side bar
| TypeScript | bsd-3-clause | jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git | ---
+++
@@ -21,28 +21,12 @@
diff: any;
}
-/** Interface for PastCommits component state */
-export interface IHistorySideBarState {
- activeNode: number;
-}
+
export class HistorySideBar extends React.Component<
IHistorySideBarProps,
- IHistorySideBarState
+ {}
> {
- constructor(props: IHistorySideBa... |
e906151751e424e7727c32b148b03c11ce21760c | src/features/structureProvider.ts | src/features/structureProvider.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | Allow GetType to return undefined | Allow GetType to return undefined
| TypeScript | mit | OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode,OmniSharp/omnisharp-vscode | ---
+++
@@ -28,7 +28,7 @@
}
}
- GetType(type: string): FoldingRangeKind {
+ GetType(type: string): FoldingRangeKind | undefined {
switch (type) {
case "Comment":
return FoldingRangeKind.Comment;
@@ -37,7 +37,7 @@
case "Region":
... |
5f95bbc927f1161dfef3481ead5f6098fe60f0f7 | src/app/services/form.service.ts | src/app/services/form.service.ts | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Injectable()
export class FormService {
private phenotypesUrl = 'http://private-de10f-seqpipe.apiary-mock.com/phenotypes';
constructor (private http: Http)... | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Injectable()
export class FormService {
private phenotypesUrl = 'http://private-de10f-seqpipe.apiary-mock.com/phenotypes';
constructor (private http: Http)... | Fix in the request urls. | Fix in the request urls.
| TypeScript | mit | Ftujio/gen,Ftujio/gen,Ftujio/gen | ---
+++
@@ -14,14 +14,14 @@
}
getPresentInChild(){
- return this.http.get('http://localhost:4400/app/services/present-in-child.json').map(response => response.json());
+ return this.http.get('http://localhost:4200/app/services/present-in-child.json').map(response => response.json());
}
getPresentInParen... |
9f555d1c445f26a43ac69e2b8ac58633b0a22bf7 | src/components/log/index.tsx | src/components/log/index.tsx | import * as React from 'react'
import flowRight from 'lodash-es/flowRight'
import {connect} from 'react-redux'
import {firebaseConnect} from 'react-redux-firebase'
import {LogEntry} from './log-entry'
import {momentedLogsSelector} from '../../selectors/momented-logs'
import {IMomentLog, IRootState} from '../../types'
... | import * as React from 'react'
import flowRight from 'lodash-es/flowRight'
import {connect} from 'react-redux'
import {firebaseConnect} from 'react-redux-firebase'
import {LogEntry} from './log-entry'
import {momentedLogsSelector} from '../../selectors/momented-logs'
import {IMomentLog, IRootState} from '../../types'
... | Fix log sort and limit logic | Fix log sort and limit logic
| TypeScript | mit | jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend,jsse-2017-ph23/web-frontend | ---
+++
@@ -34,7 +34,7 @@
export const Log = flowRight(
firebaseConnect([
- '/log#limitToFirst=50'
+ '/log#limitToLast=50#orderByChild=time'
]),
connect(mapStateToProps)
)(LogImpl) |
f2e92d80aca5c3dfa13841cd03390edaeacaef45 | resources/scripts/components/elements/PageContentBlock.tsx | resources/scripts/components/elements/PageContentBlock.tsx | import React, { useEffect } from 'react';
import ContentContainer from '@/components/elements/ContentContainer';
import { CSSTransition } from 'react-transition-group';
import tw from 'twin.macro';
import FlashMessageRender from '@/components/FlashMessageRender';
export interface PageContentBlockProps {
title?: st... | import React, { useEffect } from 'react';
import ContentContainer from '@/components/elements/ContentContainer';
import { CSSTransition } from 'react-transition-group';
import tw from 'twin.macro';
import FlashMessageRender from '@/components/FlashMessageRender';
export interface PageContentBlockProps {
title?: st... | Adjust copyright in footer to be more consistent | Adjust copyright in footer to be more consistent | TypeScript | mit | Pterodactyl/Panel,Pterodactyl/Panel,Pterodactyl/Panel,Pterodactyl/Panel | ---
+++
@@ -28,15 +28,15 @@
</ContentContainer>
<ContentContainer css={tw`mb-4`}>
<p css={tw`text-center text-neutral-500 text-xs`}>
- © 2015 - {(new Date()).getFullYear()}
<a
... |
3f704c2c9736cc5b1cd8f18ade2d87cd52a6387b | src/components/SearchResults.tsx | src/components/SearchResults.tsx | import React from 'react';
import styled from 'styled-components';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { EdamamHit } from '../types/edamam';
import { allRecipes } from '../redux/selectors';
import SearchResultsItem from './SearchResultsItem';
type Search... | import React from 'react';
import styled from 'styled-components';
import { connect } from 'react-redux';
import { createStructuredSelector } from 'reselect';
import { EdamamHit } from '../types/edamam';
import { allRecipes } from '../redux/selectors';
import SearchResultsItem from './SearchResultsItem';
type Search... | Set max three recipe cards per row in grid layout | Set max three recipe cards per row in grid layout
| TypeScript | mit | mbchoa/recipeek,mbchoa/recipeek,mbchoa/recipeek | ---
+++
@@ -13,16 +13,17 @@
};
const Block = styled.section`
- padding-top: 8px;
+ margin: 0 auto;
+ max-width: 954px;
`;
const SearchResultsList = styled.ul`
display: grid;
- justify-content: center;
list-style-type: none;
- grid-template-columns: repeat(auto-fit, 300px);
+ grid-template-columns:... |
5243995bc376e93b606633469d52cf81a33131b2 | app/src/lib/git/stash.ts | app/src/lib/git/stash.ts | import { git } from '.'
import { Repository } from '../../models/repository'
export interface IStashEntry {
/** The name of the branch at the time the entry was created. */
readonly branchName: string
/** The SHA of the commit object created as a result of stashing. */
readonly stashSha: string
}
/** RegEx f... | import { git } from '.'
import { Repository } from '../../models/repository'
export const MagicStashString = '!github-desktop'
export interface IStashEntry {
/** The name of the branch at the time the entry was created. */
readonly branchName: string
/** The SHA of the commit object created as a result of stash... | Add function to pull out branchName | Add function to pull out branchName
| TypeScript | mit | desktop/desktop,say25/desktop,say25/desktop,kactus-io/kactus,kactus-io/kactus,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,desktop/desktop,say25/desktop,kactus-io/kactus,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,artivilla/desktop,say25/desktop,... | ---
+++
@@ -1,6 +1,7 @@
import { git } from '.'
import { Repository } from '../../models/repository'
+export const MagicStashString = '!github-desktop'
export interface IStashEntry {
/** The name of the branch at the time the entry was created. */
readonly branchName: string
@@ -12,6 +13,11 @@
/** RegEx f... |
da6a8db53cfafe06ffae3172d7b4105e717b6a32 | src/derivable/index.ts | src/derivable/index.ts | export * from './atom';
import './boolean-funcs';
export * from './constant';
export * from './derivable';
export * from './derivation';
export * from './lens';
export * from './unpack';
// Extend the Derivable interface with the react method.
import '../reactor';
| export * from './atom';
import './boolean-funcs';
export * from './constant';
export * from './derivable';
export * from './derivation';
export * from './lens';
export * from './unpack';
| Fix circular dependency reported by Rollup | Fix circular dependency reported by Rollup
| TypeScript | apache-2.0 | politie/sherlock,politie/sherlock,politie/sherlock,politie/sherlock | ---
+++
@@ -5,6 +5,3 @@
export * from './derivation';
export * from './lens';
export * from './unpack';
-
-// Extend the Derivable interface with the react method.
-import '../reactor'; |
112fe2d34fba89eaa9f6c08fd48293d76c502c16 | packages/lesswrong/server/emails/sendEmail.ts | packages/lesswrong/server/emails/sendEmail.ts | import { DatabaseServerSetting } from '../databaseSettings';
import type { RenderedEmail } from './renderEmail';
import nodemailer from 'nodemailer';
export const mailUrlSetting = new DatabaseServerSetting<string | null>('mailUrl', null) // The SMTP URL used to send out email
const getMailUrl = () => {
if (mailUrlS... | import { DatabaseServerSetting } from '../databaseSettings';
import type { RenderedEmail } from './renderEmail';
import nodemailer from 'nodemailer';
export const mailUrlSetting = new DatabaseServerSetting<string | null>('mailUrl', null) // The SMTP URL used to send out email
const getMailUrl = () => {
if (mailUrlS... | Fix typo in error message | Fix typo in error message
| TypeScript | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -19,7 +19,7 @@
if (!mailUrl) {
// eslint-disable-next-line no-console
- console.log("Enable to send email because no mailserver is configured");
+ console.log("Unable to send email because no mailserver is configured");
return false;
}
|
aa016fbe16318900ffe6019e550a526fb3c44e84 | packages/node-sass-once-importer/src/index.ts | packages/node-sass-once-importer/src/index.ts | import {
buildIncludePaths,
resolveUrl,
} from 'node-sass-magic-importer/dist/toolbox';
const EMPTY_IMPORT = {
file: ``,
contents: ``,
};
export = function onceImporter() {
const contextTemplate = {
store: new Set(),
};
return function importer(url: string, prev: string) {
const nodeSassOptions... | import {
buildIncludePaths,
resolveUrl,
} from 'node-sass-magic-importer/dist/toolbox';
const EMPTY_IMPORT = {
file: ``,
contents: ``,
};
export = function onceImporter() {
return function importer(url: string, prev: string) {
const nodeSassOptions = this.options;
// Create a context for the current... | Fix shared context between webpack instances | Fix shared context between webpack instances
Fixes #189
| TypeScript | mit | maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer | ---
+++
@@ -9,17 +9,15 @@
};
export = function onceImporter() {
- const contextTemplate = {
- store: new Set(),
- };
-
return function importer(url: string, prev: string) {
const nodeSassOptions = this.options;
// Create a context for the current importer run.
// An importer run is differen... |
ad2257e4a309b135e481f77dc820b0363eda42a4 | src/clients/extensions/injected/modules/browser.ts | src/clients/extensions/injected/modules/browser.ts | import { message, PLAYER_EXIT_FULLSCREEN, HANDSHAKE } from "../../../../communication/actions";
import { initActions } from "./events";
import { sendOkResponse } from "./messaging";
const noop = () => { }
export const addMessageListener = (callback: any) => {
chrome.runtime.onMessage.addListener(function (request:... | import { message, PLAYER_EXIT_FULLSCREEN, HANDSHAKE } from "../../../../communication/actions";
import { initActions } from "./events";
import { sendOkResponse } from "./messaging";
const noop = () => { }
export const addMessageListener = (callback: any) => {
chrome.runtime.onMessage.addListener(function (request:... | Fix postmessage only when receiving message from our extension | Fix postmessage only when receiving message from our extension
| TypeScript | mit | wdelmas/remote-potato,wdelmas/remote-potato,wdelmas/remote-potato | ---
+++
@@ -5,10 +5,12 @@
export const addMessageListener = (callback: any) => {
chrome.runtime.onMessage.addListener(function (request: message, sender: any, sendResponse: (response: any) => void) {
- callback(request, sender)
- .then((result: message) => {
- chrome.runtime.s... |
d2e062d16e03cd085d5055efda83381fbec21298 | src/utils/gamehelpers.ts | src/utils/gamehelpers.ts | import * as Phaser from 'phaser-ce'
/**
* Sets to skip Phaser internal type checking
* Workaround until https://github.com/photonstorm/phaser-ce/issues/317 is resolved
*/
export const skipBuiltinTypeChecks = (): void => {
Phaser['Component'].Core.skipTypeChecks = true
}
/**
* Get random value between the max ... | import * as Phaser from 'phaser-ce'
/**
* Sets to skip Phaser internal type checking
* Workaround until https://github.com/photonstorm/phaser-ce/issues/317 is resolved
*/
export const skipBuiltinTypeChecks = (): void => {
Phaser['Component'].Core.skipTypeChecks = true
}
/**
* Get random value between the max ... | Implement uuid function and fix random function | Implement uuid function and fix random function
| TypeScript | unlicense | codingInSpace/CoffeeConundrum,codingInSpace/CoffeeConundrum,codingInSpace/CoffeeConundrum,codingInSpace/CoffeeConundrum | ---
+++
@@ -15,7 +15,7 @@
* @returns {number}
*/
export function randomInRange(min: number, max: number): number {
- return Math.floor(Math.random() * max) + min
+ return Math.floor(Math.random() * (max - min + 1)) + min
}
export function randomYPos(height: number): number {
@@ -34,3 +34,7 @@
const pad ... |
88a5a50752e2e72579ca65c82939efbb2eccdb84 | src/app/doc/utilities/component.component.ts | src/app/doc/utilities/component.component.ts | import { Component, OnInit} from '@angular/core';
import { DocService } from '../doc.service';
import { PolarisComponent } from '../doc.data';
export abstract class ComponentComponent {
public component: PolarisComponent;
protected abstract componentPath;
constructor(protected service: DocService) {
... | import { Component, OnInit} from '@angular/core';
import { DocService } from '../doc.service';
import { PolarisComponent } from '../doc.data';
export abstract class ComponentComponent {
public component: PolarisComponent;
protected abstract componentPath;
constructor(protected service: DocService) {
... | Add indent function + remove bracket around static attributes. | Add indent function + remove bracket around static attributes.
| TypeScript | mit | syrp-nz/angular-polaris,syrp-nz/angular-polaris,syrp-nz/angular-polaris | ---
+++
@@ -22,7 +22,7 @@
* @return {string} [description]
*/
protected nullableAttr(attr: string): string {
- return this[attr] != "" ? `\n [${attr}]="${this[attr]}"` : '';
+ return this[attr] != "" ? this.indent(`${attr}="${this[attr]}"`) : '';
}
/**
@@ -32,11 +32,... |
22f865726a758bfee084fc275d77126f80e52378 | js/components/table/raiseBlock/raiseBlock.ts | js/components/table/raiseBlock/raiseBlock.ts | /// <reference types="knockout" />
import ko = require("knockout");
import { TableSlider } from "../../../table/tableSlider";
export class RaiseBlockComponent {
private tableSlider: TableSlider;
constructor(params: { data: TableSlider }) {
this.tableSlider = params.data;
}
}
| /// <reference types="knockout" />
import ko = require("knockout");
import { TableSlider } from "../../../table/tableSlider";
export class RaiseBlockComponent {
private tableSlider: TableSlider;
constructor(params: { data: TableSlider, updateTranslatorTrigger: KnockoutSubscribable<any>, updateTranslator: Fun... | Add support for force update of raise block | Add support for force update of raise block
| TypeScript | apache-2.0 | online-poker/poker-html-client,online-poker/poker-html-client,online-poker/poker-html-client | ---
+++
@@ -6,7 +6,16 @@
export class RaiseBlockComponent {
private tableSlider: TableSlider;
- constructor(params: { data: TableSlider }) {
+ constructor(params: { data: TableSlider, updateTranslatorTrigger: KnockoutSubscribable<any>, updateTranslator: Function }) {
this.tableSlider = params.d... |
c6defcf1160f98136ac720e36f0c02236d58f313 | src/definition/load-js.ts | src/definition/load-js.ts | import clearModule from 'clear-module'
import type { Middleware } from 'koa'
import type { Logger } from '../interfaces'
/**
* @param filePath - path to load file
* @param logger
* @returns
* return loaded stuff if successfully loaded;
* return `undefined` if failed to load;
*/
export defaul... | import clearModule from 'clear-module'
import type { Middleware } from 'koa'
import path from 'path'
import type { Logger } from '../interfaces'
/**
* @param filePath - path to load file
* @param logger
* @returns
* return loaded stuff if successfully loaded;
* return `undefine... | Fix windows path RegExp error | Fix windows path RegExp error
| TypeScript | mit | whitetrefoil/mock-server-middleware,whitetrefoil/mock-server-middleware | ---
+++
@@ -1,5 +1,6 @@
import clearModule from 'clear-module'
import type { Middleware } from 'koa'
+import path from 'path'
import type { Logger } from '../interfaces'
@@ -12,7 +13,8 @@
*/
export default function loadJsDef(filePath: string, logger: Logger): Middleware|undefined ... |
782f4cf8646ee4aa3382b4176ff7ffe2884c6e0a | src/report/CommandLine.ts | src/report/CommandLine.ts | import Symbols from './Symbols';
class CommandLine {
public write(results: ResultInterface[], level: number = 0): void {
results.forEach((result) => {
this.print(result.getTitle(), result.getStatus(), level);
const r = result.getResults();
if (r !== null) {
this.write(r, level + 1);
... | import Symbols from './Symbols';
class CommandLine {
public write(results: ResultInterface[], level: number = 0): void {
results.forEach((result) => {
const r = result.getResults();
if ((r !== null && r.length > 0) || level > 0) {
this.print(result.getTitle(), result.getStatus(), level);
... | Fix report when grep param is used | Fix report when grep param is used
If the user wanted to run just one or more tests from security,
the report also contained HTML successful message.
| TypeScript | mit | juffalow/pentest-tool-lite,juffalow/pentest-tool-lite | ---
+++
@@ -3,8 +3,11 @@
class CommandLine {
public write(results: ResultInterface[], level: number = 0): void {
results.forEach((result) => {
- this.print(result.getTitle(), result.getStatus(), level);
const r = result.getResults();
+
+ if ((r !== null && r.length > 0) || level > 0) {
+ ... |
bcaadd6f14253ea3fe06cf2b55add859c9beb2e6 | src/HawkEye.ts | src/HawkEye.ts | import InstanceCache from 'Core/InstanceCache';
import reducers from 'Reducers/Index';
import configureStore from 'Core/ConfigureStore';
import { renderApplication } from 'Core/Renderer';
import RequestFactory from 'Core/RequestFactory';
import GitHub from 'GitHub/GitHub';
import { gitHubApiUrl } from 'Constants/Serv... | import InstanceCache from 'Core/InstanceCache';
import reducers from 'Reducers/Index';
import configureStore from 'Core/ConfigureStore';
import { renderApplication } from 'Core/Renderer';
import RequestFactory from 'Core/RequestFactory';
import GitHub from 'GitHub/GitHub';
import { gitHubApiUrl } from 'Constants/Serv... | Fix GitHub capitalisation in import | Fix GitHub capitalisation in import
| TypeScript | mit | harksys/HawkEye,harksys/HawkEye,harksys/HawkEye | ---
+++
@@ -6,7 +6,7 @@
import RequestFactory from 'Core/RequestFactory';
import GitHub from 'GitHub/GitHub';
-import { gitHubApiUrl } from 'Constants/Services/Github';
+import { gitHubApiUrl } from 'Constants/Services/GitHub';
import routes from 'Routes';
|
46a08045af5a2875af6af1d1fee66b87dab93900 | src/actions.ts | src/actions.ts | import {AppStore} from "./app-store";
/**
* Abstract class to provide utility methods for action creators
*/
export class Actions {
private appStore:AppStore = null;
constructor(appStore?:AppStore) {
if (appStore) {
this.appStore = appStore;
}
}
public createDispatcher(ac... | import {AppStore} from "./app-store";
/**
* Abstract class to provide utility methods for action creators
*/
export class Actions {
protected appStore:AppStore = null;
constructor(appStore?:AppStore) {
if (appStore) {
this.appStore = appStore;
}
}
public createDispatcher(... | Update appStore in Actions to be protected | feat: Update appStore in Actions to be protected
| TypeScript | mit | InfomediaLtd/angular2-redux,InfomediaLtd/angular2-redux,InfomediaLtd/angular2-redux | ---
+++
@@ -5,7 +5,7 @@
*/
export class Actions {
- private appStore:AppStore = null;
+ protected appStore:AppStore = null;
constructor(appStore?:AppStore) {
if (appStore) { |
7a06c3e25eac0bf32642cc1ee75840b5acb3dbae | src/lib/constants.ts | src/lib/constants.ts | /**
* Delay time before close autocomplete.
*
* (This prevent autocomplete DOM get detroyed before access data.)
*/
export const AUTOCOMPLETE_CLOSE_DELAY = 250;
/**
* Allowed attributes that can be passed to internal input.
*/
export const ALLOWED_ATTRS = [
'name',
'autofocus',
'placeholder',
'disabled',
'r... | /**
* Delay time before close autocomplete.
*
* (This prevent autocomplete DOM get detroyed before access data.)
*/
export const AUTOCOMPLETE_CLOSE_DELAY = 250;
/**
* Allowed attributes that can be passed to internal input.
*/
export const ALLOWED_ATTRS = [
'autofocus',
'disabled',
'id',
'inputmode',
'list'... | Allow more attributes for internal input | :wrench: Allow more attributes for internal input
| TypeScript | mit | gluons/vue-thailand-address | ---
+++
@@ -9,11 +9,21 @@
* Allowed attributes that can be passed to internal input.
*/
export const ALLOWED_ATTRS = [
+ 'autofocus',
+ 'disabled',
+ 'id',
+ 'inputmode',
+ 'list',
+ 'maxlength',
+ 'minlength',
'name',
- 'autofocus',
+ 'pattern',
'placeholder',
- 'disabled',
'readonly',
'required',
- 'ta... |
4bcab210d76348597e3df88f6d736c30b4225a1a | app/src/ui/lib/link-button.tsx | app/src/ui/lib/link-button.tsx | import * as React from 'react'
import { shell } from 'electron'
import * as classNames from 'classnames'
interface ILinkButtonProps extends React.HTMLProps<HTMLAnchorElement> {
/** A URI to open on click. */
readonly uri?: string
/** A function to call on click. */
readonly onClick?: () => void
/** The tit... | import * as React from 'react'
import { shell } from 'electron'
import * as classNames from 'classnames'
interface ILinkButtonProps {
/** A URI to open on click. */
readonly uri?: string | JSX.Element | ReadonlyArray<JSX.Element>
/** A function to call on click. */
readonly onClick?: () => void
/** The tit... | Remove all new <LinkButton> props except title; allow any type of child node | Remove all new <LinkButton> props except title; allow any type of child node | TypeScript | mit | j-f1/forked-desktop,say25/desktop,desktop/desktop,shiftkey/desktop,gengjiawen/desktop,artivilla/desktop,hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,shiftkey/desktop,desktop/desktop,hjobrien/desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,gengjiawen/desktop,kactus-io/kactus,desktop/desktop,artivilla/de... | ---
+++
@@ -2,9 +2,9 @@
import { shell } from 'electron'
import * as classNames from 'classnames'
-interface ILinkButtonProps extends React.HTMLProps<HTMLAnchorElement> {
+interface ILinkButtonProps {
/** A URI to open on click. */
- readonly uri?: string
+ readonly uri?: string | JSX.Element | ReadonlyArray... |
1626e7253c64dd751fa73d1e7344d1819857774f | app/src/lib/firebase.ts | app/src/lib/firebase.ts | import * as firebase from "firebase";
const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID;
export function initialize(): void {
firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: `${projectId}.firebaseapp.com`,
databaseURL: `https://${projectId}.fi... | import * as firebase from "firebase";
const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID;
export function initialize(): void {
firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: `${projectId}.firebaseapp.com`,
databaseURL: `https://${projectId}.fi... | Add signOut and deleteAccount functions | Add signOut and deleteAccount functions
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -16,6 +16,14 @@
await firebase.auth().getRedirectResult();
}
+export async function signOut(): Promise<void> {
+ await firebase.auth().signOut();
+}
+
+export async function deleteAccount(): Promise<void> {
+ await firebase.auth().currentUser.delete();
+}
+
export function onAuthStateChanged... |
049e3e9e1394508807004a8e401e826a78fbdd32 | src/search.ts | src/search.ts | import { getMoves } from './moves';
import { evaluate } from './evaluation';
import { makeMove } from './game';
export function getBestMove(grid: boolean[], forX: boolean, depth?: number): number {
if (depth == undefined)
depth = grid.length;
const moves = getMoves(grid);
const movesWithScores = moves.map(mo... | import { getMoves } from './moves';
import { evaluate } from './evaluation';
import { makeMove } from './game';
import { Grid, Move } from './definitions';
export function getBestMove(grid: Grid, forX: boolean, depth?: number): Move {
if (depth == undefined)
depth = grid.length;
const moves = getMoves(grid);
... | Make getBestMove function use Grid and Move | Make getBestMove function use Grid and Move
| TypeScript | mit | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | ---
+++
@@ -1,8 +1,9 @@
import { getMoves } from './moves';
import { evaluate } from './evaluation';
import { makeMove } from './game';
+import { Grid, Move } from './definitions';
-export function getBestMove(grid: boolean[], forX: boolean, depth?: number): number {
+export function getBestMove(grid: Grid, forX... |
2c159fa94d59a3790ce658a388609bedfb791f34 | src/test/runTests.ts | src/test/runTests.ts | import * as path from 'path';
import { runTests } from 'vscode-test';
(async function main() {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = process.cwd();
// The path to test runner
// Passed to --extensionT... | import * as path from 'path';
import { runTests } from 'vscode-test';
(async function main() {
// The folder containing the Extension Manifest package.json
// Passed to `--extensionDevelopmentPath`
const extensionDevelopmentPath = process.cwd();
// The path to test runner
// Passed to --extensionT... | Disable other extensions when running tests | Disable other extensions when running tests
| TypeScript | mit | esbenp/prettier-vscode | ---
+++
@@ -17,6 +17,6 @@
await runTests({
extensionDevelopmentPath,
extensionTestsPath,
- launchArgs: [workspace]
+ launchArgs: [workspace, "--disable-extensions"]
});
})().catch(err => console.log(err)); |
29946f324ae128941c0c8354de6b2642b1f6054d | todomvc-react-mobx-typescript/src/components/Main.tsx | todomvc-react-mobx-typescript/src/components/Main.tsx | import * as React from 'react'
import { Component } from 'react'
import { TodoModel } from './TodoModel'
import { TodoList } from './TodoList'
interface Props {
deleteTodo: (todo: TodoModel) => void
todos: Array<TodoModel>
}
export class Main extends Component<Props, void> {
public render() {
return (
... | import * as React from 'react'
import { Component } from 'react'
import { observer } from 'mobx-react'
import { TodoModel } from './TodoModel'
import { TodoList } from './TodoList'
interface Props {
deleteTodo: (todo: TodoModel) => void
todos: Array<TodoModel>
}
@observer
export class Main extends Component<Prop... | Add checkbox for toggling all todos | Add checkbox for toggling all todos
| TypeScript | unlicense | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | ---
+++
@@ -1,5 +1,6 @@
import * as React from 'react'
import { Component } from 'react'
+import { observer } from 'mobx-react'
import { TodoModel } from './TodoModel'
import { TodoList } from './TodoList'
@@ -9,11 +10,18 @@
todos: Array<TodoModel>
}
+@observer
export class Main extends Component<Props, ... |
caf0285970bb23f9912fb96f63c06b551d4dbeec | plugins/keycloak/keycloak.service.ts | plugins/keycloak/keycloak.service.ts | namespace HawtioKeycloak {
const TOKEN_UPDATE_INTERVAL = 5; // 5 sec.
export class KeycloakService {
constructor(
public readonly enabled: boolean,
public readonly keycloak: Keycloak.KeycloakInstance) {
}
updateToken(onSuccess: (token: string) => void, onError?: () => void): void {
... | namespace HawtioKeycloak {
const TOKEN_UPDATE_INTERVAL = 5; // 5 sec.
export class KeycloakService {
constructor(
public readonly enabled: boolean,
public readonly keycloak: Keycloak.KeycloakInstance) {
}
updateToken(onSuccess: (token: string) => void, onError?: () => void): void {
... | Change Keycloak Authorization header from cryptic subject to profile.username | Change Keycloak Authorization header from cryptic subject to profile.username
| TypeScript | apache-2.0 | hawtio/hawtio-oauth,hawtio/hawtio-oauth,hawtio/hawtio-oauth | ---
+++
@@ -29,7 +29,7 @@
beforeSend: (xhr: JQueryXHR, settings: JQueryAjaxSettings) => {
if (this.keycloak.authenticated && !this.keycloak.isTokenExpired(TOKEN_UPDATE_INTERVAL)) {
// hawtio uses BearerTokenLoginModule on server side
- xhr.setRequestHeader('Authorization', ... |
3cc02b61fe33377c1fba3f9a665b356f901dad03 | src/pages/login/login.ts | src/pages/login/login.ts | import { Component } from '@angular/core';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
loginForm: FormGroup;
constructor(public navCtrl: NavController, public navParams: NavParams, private fo... | import { Component } from '@angular/core';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
import { NavController, NavParams } from 'ionic-angular';
import { LoadingController } from 'ionic-angular';
@Component({
selector: 'page-login',
templateUrl: 'login.html'
})
export class LoginPage {
... | Add loading icon, To lateron wait until user is logged in and maybe content of next page has been loaded. | Add loading icon,
To lateron wait until user is logged in and maybe content of next page has been loaded.
| TypeScript | mit | IMSmobile/app,IMSmobile/app,IMSmobile/app,IMSmobile/app | ---
+++
@@ -1,5 +1,8 @@
import { Component } from '@angular/core';
import { Validators, FormBuilder, FormGroup } from '@angular/forms';
+import { NavController, NavParams } from 'ionic-angular';
+import { LoadingController } from 'ionic-angular';
+
@@ -20,7 +23,11 @@
}
login() {
- console.log(this.... |
ec13de1119d5fdcc19f02e936317d6c2ad220ee1 | framework/src/testsuite/TestRequest.ts | framework/src/testsuite/TestRequest.ts | import { JovoRequest, JovoSession, EntityMap, UnknownObject } from '..';
import { Intent } from '../interfaces';
import { AudioInput, InputType } from '../JovoInput';
export class TestRequest extends JovoRequest {
isTestRequest = true;
locale!: string;
session: JovoSession = new JovoSession({ state: [] });
use... | import { JovoRequest, JovoSession, EntityMap, UnknownObject } from '..';
import { Intent } from '../interfaces';
import { AudioInput, InputType } from '../JovoInput';
export class TestRequest extends JovoRequest {
isTestRequest = true;
locale!: string;
session: JovoSession = new JovoSession({ isNew: false, state... | Set isNew to false on default session | :bug: Set isNew to false on default session
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -5,7 +5,7 @@
export class TestRequest extends JovoRequest {
isTestRequest = true;
locale!: string;
- session: JovoSession = new JovoSession({ state: [] });
+ session: JovoSession = new JovoSession({ isNew: false, state: [] });
userId!: string;
getLocale(): string | undefined { |
6f9c6681f635adb83561eef439b9bf420d3d4a25 | src/util/DeprecatedClassDecorator.ts | src/util/DeprecatedClassDecorator.ts | export function deprecatedClass(message: string): ClassDecorator;
export function deprecatedClass<T>(target: T, key: PropertyKey): void;
/**
* Logs a deprecation warning for the decorated class if
* an instance is created
* @param {string} [message] Class deprecation message
* @returns {ClassDecorator}
*/
export f... | export function deprecatedClass(message: string): ClassDecorator;
export function deprecatedClass<T>(target: T): T;
/**
* Logs a deprecation warning for the decorated class if
* an instance is created
* @param {string} [message] Class deprecation message
* @returns {ClassDecorator}
*/
export function deprecatedCla... | Update deprecatedClass decorator function signatures | Update deprecatedClass decorator function signatures
| TypeScript | mit | zajrik/yamdbf,zajrik/yamdbf | ---
+++
@@ -1,5 +1,5 @@
export function deprecatedClass(message: string): ClassDecorator;
-export function deprecatedClass<T>(target: T, key: PropertyKey): void;
+export function deprecatedClass<T>(target: T): T;
/**
* Logs a deprecation warning for the decorated class if
* an instance is created |
0eb9a227403ee4430624fbb7fe16b13941e4586e | types/bigi/bigi-tests.ts | types/bigi/bigi-tests.ts | import BigInteger = require('bigi');
const b1 = BigInteger.fromHex("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012");
const b2 = BigInteger.fromHex("07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
const b3 = b1.multiply(b2);
console.log(b3.toHex());
// => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7... | import BigInteger = require('bigi');
const b1 = BigInteger.fromHex("188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012");
const b2 = BigInteger.fromHex("07192B95FFC8DA78631011ED6B24CDD573F977A11E794811");
const b3 = b1.multiply(b2);
console.log(b3.toHex());
// => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7... | Expand tests to cover the previous change | Expand tests to cover the previous change
| TypeScript | mit | rolandzwaga/DefinitelyTyped,dsebastien/DefinitelyTyped,markogresak/DefinitelyTyped,rolandzwaga/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,AgentME/DefinitelyTyped,magny/DefinitelyTyped,dsebastien/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,borisyankov/DefinitelyTy... | ---
+++
@@ -7,3 +7,10 @@
console.log(b3.toHex());
// => ae499bfe762edfb416d0ce71447af67ff33d1760cbebd70874be1d7a5564b0439a59808cb1856a91974f7023f72132
+
+const b4 = BigInteger.valueOf(42);
+const b5 = BigInteger.valueOf(10);
+const b6 = b4.multiply(b5);
+
+console.log(b6);
+// => BigInteger { '0': 420, '1': 0, t:... |
2ece138af6866ccf1fdfa1e14d1e033fab0696ff | src/a2t-ui/a2t-ui.routes.ts | src/a2t-ui/a2t-ui.routes.ts | import { Routes, RouterModule } from '@angular/router';
import { Angular2TokenService } from '../angular2-token.service';
import { A2tUiComponent } from './a2t-ui.component';
import { A2tSignInComponent } from './a2t-sign-in/a2t-sign-in.component';
import { A2tSignUpComponent } from './a2t-sign-up/a2t-sign-up.componen... | import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { Angular2TokenService } from '../angular2-token.service';
import { A2tUiComponent } from './a2t-ui.component';
import { A2tSignInComponent } from './a2t-sign-in/a2t-sign-in.component';
import { A2tSignU... | Declare ModuleWithProviders to be AOT ready with Angular-cli | Declare ModuleWithProviders to be AOT ready with Angular-cli
| TypeScript | mit | fastindian84/angular2-token,Tybot204/angular2-token,neroniaky/angular2-token,chadnaylor/angular2-token-ionic3,neroniaky/angular2-token,chadnaylor/angular2-token-ionic3,Tybot204/angular2-token,fastindian84/angular2-token | ---
+++
@@ -1,3 +1,4 @@
+import { ModuleWithProviders } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { Angular2TokenService } from '../angular2-token.service';
|
08f932342786e391d01316d64f94a78a9f5bfad2 | src/app/doc/doc.service.ts | src/app/doc/doc.service.ts | import { Injectable } from '@angular/core'
import { Observable } from 'rxjs'
import * as MuteStructs from 'mute-structs'
@Injectable()
export class DocService {
private doc: any
constructor() {
this.doc = new MuteStructs.LogootSRopes(0)
}
setTextOperationsStream(textOperationsStream: Observable<any[]>... | import { Injectable } from '@angular/core'
import { Observable } from 'rxjs'
import { NetworkService } from '../core/network/network.service'
import * as MuteStructs from 'mute-structs'
@Injectable()
export class DocService {
private doc: any
private network: NetworkService
private remoteTextOperationsStream... | Apply remote operations and stream resulting text operations | feat(doc): Apply remote operations and stream resulting text operations
Subscribe to the stream of remote LogootSplit operations, apply them to the data model and generate
a new stream of the resulting text operations
| TypeScript | agpl-3.0 | coast-team/mute,coast-team/mute,coast-team/mute,oster/mute,coast-team/mute,oster/mute,oster/mute | ---
+++
@@ -1,5 +1,7 @@
import { Injectable } from '@angular/core'
import { Observable } from 'rxjs'
+
+import { NetworkService } from '../core/network/network.service'
import * as MuteStructs from 'mute-structs'
@@ -7,15 +9,25 @@
export class DocService {
private doc: any
+ private network: NetworkSer... |
eea137fafb52ff26ac46e5eda5ddc4938c2f5fa9 | app/subscription/subscription.component.ts | app/subscription/subscription.component.ts | import {Component} from '@angular/core';
@Component({
selector: 'subscription',
templateUrl: 'app/subscription/subscription.component.html'
})
export class SubscriptionComponent {
}
| import {Component} from '@angular/core';
import {Mentor} from './mentors_and_courses/mentor';
import {Course} from './mentors_and_courses/course';
@Component({
selector: 'subscription',
templateUrl: 'app/subscription/subscription.component.html'
})
export class SubscriptionComponent {
public mentors: Mentor[];
... | Add mentors and courses to SubscriptionComponent | Add mentors and courses to SubscriptionComponent
| TypeScript | mit | dhilt/a2-mkdev-sub,dhilt/a2-mkdev-sub,dhilt/a2-mkdev-sub | ---
+++
@@ -1,4 +1,6 @@
import {Component} from '@angular/core';
+import {Mentor} from './mentors_and_courses/mentor';
+import {Course} from './mentors_and_courses/course';
@Component({
selector: 'subscription',
@@ -6,4 +8,6 @@
})
export class SubscriptionComponent {
+ public mentors: Mentor[];
+ public ... |
416f710573aa64ddea4200e57e9645a9245577cc | sample/19-auth/src/auth/auth.module.ts | sample/19-auth/src/auth/auth.module.ts | import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { JwtStrategy } from './jwt.strategy';
@Module({
imports: [
PassportModule.... | import { Module } from '@nestjs/common';
import { JwtModule } from '@nestjs/jwt';
import { PassportModule } from '@nestjs/passport';
import { AuthController } from './auth.controller';
import { AuthService } from './auth.service';
import { JwtStrategy } from './jwt.strategy';
@Module({
imports: [
PassportModule.... | Update sample to avoid deprecated secretOrPrivateKey | fix(sample): Update sample to avoid deprecated secretOrPrivateKey
| TypeScript | mit | kamilmysliwiec/nest,kamilmysliwiec/nest | ---
+++
@@ -9,7 +9,7 @@
imports: [
PassportModule.register({ defaultStrategy: 'jwt' }),
JwtModule.register({
- secretOrPrivateKey: 'secretKey',
+ secret: 'secretKey',
signOptions: {
expiresIn: 3600,
}, |
b39e81c8cde014b227f8de90c90c32c1d476c9a9 | AzureFunctions.Client/app/models/constants.ts | AzureFunctions.Client/app/models/constants.ts | export class Constants {
public static latestExtensionVersion = "~0.2";
public static latest = "latest";
public static extensionVersionAppSettingName = "FUNCTIONS_EXTENSION_VERSION";
}
| export class Constants {
public static latestExtensionVersion = "~0.3";
public static latest = "latest";
public static extensionVersionAppSettingName = "FUNCTIONS_EXTENSION_VERSION";
}
| Update latest extension version to "~0.3" | Update latest extension version to "~0.3"
| TypeScript | apache-2.0 | agruning/azure-functions-ux,agruning/azure-functions-ux,chunye/azure-functions-ux,agruning/azure-functions-ux,projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/WebJobsPortal,projectkudu/WebJobsPortal,projectkudu/AzureFunctions,agruning/azure-functions-ux,chunye/azure-functions-ux,chunye/azure-functions-... | ---
+++
@@ -1,5 +1,5 @@
export class Constants {
- public static latestExtensionVersion = "~0.2";
+ public static latestExtensionVersion = "~0.3";
public static latest = "latest";
public static extensionVersionAppSettingName = "FUNCTIONS_EXTENSION_VERSION";
} |
2d60094aa4ba3e0023349e97f5e90237d861f82f | src/core/abstractComponentContainer.ts | src/core/abstractComponentContainer.ts | ///<reference path="../reference.ts" />
module Plottable {
export class AbstractComponentContainer extends Component {
public _components: Component[] = [];
public _removeComponent(c: Component) {
var removeIndex = this._components.indexOf(c);
if (removeIndex >= 0) {
this._components.spli... | ///<reference path="../reference.ts" />
module Plottable {
export class AbstractComponentContainer extends Component {
public _components: Component[] = [];
public _removeComponent(c: Component) {
var removeIndex = this._components.indexOf(c);
if (removeIndex >= 0) {
this._components.spli... | Change empty() to a boolean test, and add removeAll for ditching all the components | Change empty() to a boolean test, and add removeAll for ditching all the components
| TypeScript | mit | NextTuesday/plottable,onaio/plottable,gdseller/plottable,alyssaq/plottable,palantir/plottable,RobertoMalatesta/plottable,jacqt/plottable,palantir/plottable,danmane/plottable,softwords/plottable,jacqt/plottable,softwords/plottable,NextTuesday/plottable,danmane/plottable,softwords/plottable,alyssaq/plottable,palantir/plo... | ---
+++
@@ -23,7 +23,11 @@
}
public empty() {
- this._components.forEach((c) => this._removeComponent(c));
+ return this._components.length === 0;
+ }
+
+ public removeAll() {
+ this._components.forEach((c: Component) => c.remove());
}
}
} |
9c700ee17e7cf360853ceaeefa557d86a3a3ab3c | app/src/components/preview/preview.service.ts | app/src/components/preview/preview.service.ts | module app.preview {
import TreeService = app.tree.TreeService;
import DataschemaService = app.core.dataschema.DataschemaService;
export class PreviewService implements Observer<PreviewUpdateEvent> {
public schema:{};
public uiSchema:{};
static $inject = ['TreeService', 'Dataschema... | module app.preview {
import TreeService = app.tree.TreeService;
import DataschemaService = app.core.dataschema.DataschemaService;
export class PreviewService implements Observer<PreviewUpdateEvent> {
public schema:{};
public uiSchema:{};
static $inject = ['TreeService', 'Dataschema... | Correct error in schema and uiSchema assignments in constructor | Correct error in schema and uiSchema assignments in constructor
| TypeScript | mit | FelixThieleTUM/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,pancho111203/JsonFormsEditor,eclipsesource/JsonFormsEditor,eclipsesource/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,pancho111203/JsonFormsEditor,pancho111203/JsonFormsEditor,FelixThieleTUM/JsonFormsEditor,pancho111203/JsonFormsEditor,eclipsesource/JsonFo... | ---
+++
@@ -9,8 +9,8 @@
static $inject = ['TreeService', 'DataschemaService'];
constructor(private treeService:TreeService, private dataschemaService:DataschemaService) {
- this.schema = JSON.parse(treeService.exportUISchemaAsJSON());
- this.uiSchema = dataschemaService.getDa... |
fe493907d803a540a44aac2e75bcafddbd61fb41 | src/app/Utils/RouterProvider.ts | src/app/Utils/RouterProvider.ts | import {IRouterConfiguration, IRouter} from '../Routing';
import {ModuleProvider} from './ModuleProvider';
export class RouterProvider {
private static instance: RouterProvider = null;
public readonly ROUTING: string = '/config/Routing';
protected moduleProvider: ModuleProvider;
protected routers: IRo... | import {IRouterConfiguration, IRouter} from '../Routing';
import {ModuleProvider} from './ModuleProvider';
export class RouterProvider {
private static instance: RouterProvider = null;
public readonly ROUTING: string = '/config/Routing';
protected moduleProvider: ModuleProvider;
protected routers: IRo... | Return routers if kernel dir is not provide | Return routers if kernel dir is not provide
| TypeScript | mit | vincent-chapron/resonance-js,vincent-chapron/resonance-js,vincent-chapron/resonance-js | ---
+++
@@ -19,8 +19,8 @@
return this.instance;
}
- public getAppRouters(kernelDirectory: string): IRouter[] {
- if (this.routers.length === 0) {
+ public getAppRouters(kernelDirectory: string = null): IRouter[] {
+ if (this.routers.length === 0 && kernelDirectory !== null) {
... |
5aab66e9753d4e0ac4699aa38893a2288ca5f553 | src/interfaces/UserEvent.ts | src/interfaces/UserEvent.ts | import Message from './Message'
import MessageSendParams from './MessageSendParams'
import { VKResponse } from './APIResponses'
export default interface UserEvent {
pattern: RegExp,
listener(msg?: Message, exec?: RegExpExecArray, reply?: (text: string, params: MessageSendParams) => Promise<VKResponse>): void
} | import Message from './Message'
import MessageSendParams from './MessageSendParams'
import { VKResponse } from './APIResponses'
export default interface UserEvent {
pattern: RegExp,
listener(msg?: Message, exec?: RegExpExecArray, reply?: (text?: string, params?: MessageSendParams) => Promise<VKResponse>): void
} | Make arguments in listener optional | Make arguments in listener optional
| TypeScript | mit | vitalyavolyn/node-vk-bot,vitalyavolyn/node-vk-bot | ---
+++
@@ -4,5 +4,5 @@
export default interface UserEvent {
pattern: RegExp,
- listener(msg?: Message, exec?: RegExpExecArray, reply?: (text: string, params: MessageSendParams) => Promise<VKResponse>): void
+ listener(msg?: Message, exec?: RegExpExecArray, reply?: (text?: string, params?: MessageSendParams) ... |
3d1026cc8d1bfe08b21cbaf7239c3757bb26c53a | knexfile.ts | knexfile.ts | require('dotenv').config();
/**
* This is the database configuration for the migrations and
* the seeders.
*/
module.exports = {
client: process.env.DB_CLIENT,
connection: process.env.DB_CONNECTION,
migrations: {
directory: process.env.DB_MIGRATION_DIR,
tableName: process.env.DB_MIGRATIO... | import * as dotenv from 'dotenv';
dotenv.config();
/**
* This is the database configuration for the migrations and
* the seeders.
*/
module.exports = {
client: process.env.DB_CLIENT,
connection: process.env.DB_CONNECTION,
migrations: {
directory: process.env.DB_MIGRATION_DIR,
tableName: ... | Use es6 import to be tslint compiant | Use es6 import to be tslint compiant
| TypeScript | mit | w3tecch/express-typescript-boilerplate,w3tecch/express-typescript-boilerplate,w3tecch/express-typescript-boilerplate | ---
+++
@@ -1,4 +1,5 @@
-require('dotenv').config();
+import * as dotenv from 'dotenv';
+dotenv.config();
/**
* This is the database configuration for the migrations and |
191dcf06ea39bc9f139df64ed642fc82a2ec25d1 | src/utils.ts | src/utils.ts | import { Vector2 } from "three";
export const textAlign = {
center: new Vector2(0, 0),
left: new Vector2(1, 0),
topLeft: new Vector2(1, -1),
topRight: new Vector2(-1, -1),
right: new Vector2(-1, 0),
bottomLeft: new Vector2(1, 1),
bottomRight: new Vector2(-1, 1),
}
var fontHeightCache: { [id: string]: n... | import { Vector2 } from "three";
export const textAlign = {
center: new Vector2(0, 0),
left: new Vector2(1, 0),
top: new Vector2(0, -1),
topLeft: new Vector2(1, -1),
topRight: new Vector2(-1, -1),
right: new Vector2(-1, 0),
bottom: new Vector2(0, 1),
bottomLeft: new Vector2(1, 1),
bottomRight: new Ve... | Add bottom and top text aligns | Add bottom and top text aligns
Solves #35 by adding new alignments.
| TypeScript | mit | gamestdio/three-text2d,gamestdio/three-text2d,gamestdio/three-text2d | ---
+++
@@ -3,9 +3,11 @@
export const textAlign = {
center: new Vector2(0, 0),
left: new Vector2(1, 0),
+ top: new Vector2(0, -1),
topLeft: new Vector2(1, -1),
topRight: new Vector2(-1, -1),
right: new Vector2(-1, 0),
+ bottom: new Vector2(0, 1),
bottomLeft: new Vector2(1, 1),
bottomRight: new... |
8c6d489634c7cf895bafac5621069e518fe369a5 | packages/truffle-decoder/lib/allocate/general.ts | packages/truffle-decoder/lib/allocate/general.ts | import { AstDefinition, AstReferences } from "truffle-decode-utils";
function getDeclarationsForTypes(contracts: AstDefinition[], types: string[]): AstReferences {
let result: AstReferences = {};
for (let i = 0; i < contracts.length; i++) {
const contract = contracts[i];
if (contract) {
for (const n... | import { AstDefinition, AstReferences } from "truffle-decode-utils";
function getDeclarationsForTypes(contracts: AstDefinition[], types: string[]): AstReferences {
let result: AstReferences = {};
for (let contract of contracts) {
if (contract) {
for (const node of contract.nodes) {
if (types.inc... | Replace counter variable with for/of loop | Replace counter variable with for/of loop
| TypeScript | mit | ConsenSys/truffle | ---
+++
@@ -3,8 +3,7 @@
function getDeclarationsForTypes(contracts: AstDefinition[], types: string[]): AstReferences {
let result: AstReferences = {};
- for (let i = 0; i < contracts.length; i++) {
- const contract = contracts[i];
+ for (let contract of contracts) {
if (contract) {
for (const n... |
bdcef01d37ad23add978a6892100c8f3a70eda42 | src/utils/formatting.ts | src/utils/formatting.ts | /**
* Trims leading and trailing whitespace and line terminators and replaces all
* characters after character 90 with an ellipsis.
* @param str
*/
export const truncate = (str: string): string => {
const trimmed = str.trim();
return trimmed.length > 90 ? trimmed.slice(0, 89).concat(' ...') : trimmed;
... | /**
* Trims leading and trailing whitespace and line terminators and replaces all
* characters after character 90 with an ellipsis.
* @param str
*/
export const truncate = (str: string, max = 90): string => {
const trimmed = str.trim();
return trimmed.length > max ? trimmed.slice(0, 89).concat(' ...') :... | Truncate now accepts an optional max string length parameter | Truncate now accepts an optional max string length parameter
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -3,7 +3,7 @@
* characters after character 90 with an ellipsis.
* @param str
*/
-export const truncate = (str: string): string => {
+export const truncate = (str: string, max = 90): string => {
const trimmed = str.trim();
- return trimmed.length > 90 ? trimmed.slice(0, 89).concat(' ...') : trimmed... |
a94928b9e744b839579ba6eb9828bb89d0b36864 | front/components/images/pull/pull-image-vm.ts | front/components/images/pull/pull-image-vm.ts | import * as ko from 'knockout'
import * as fs from 'fs'
import state from '../../state'
class Run {
modalActive = ko.observable(false)
pullEnabled = ko.observable(true)
imageName = ko.observable('')
tag = ko.observable('')
hideModal = () => this.modalActive(false)
showModal = () => {
this.imageName(... | import * as ko from 'knockout'
import * as fs from 'fs'
import state from '../../state'
class Run {
modalActive = ko.observable(false)
pullEnabled = ko.observable(true)
imageName = ko.observable('')
tag = ko.observable('')
hideModal = () => this.modalActive(false)
showModal = () => {
this.imageName(... | Allow empty pull image tag in viewmodel | Bugfix: Allow empty pull image tag in viewmodel
| TypeScript | mit | the-concierge/concierge,the-concierge/concierge,the-concierge/concierge | ---
+++
@@ -21,13 +21,13 @@
const imageName = this.imageName()
const tag = this.tag()
- if (!imageName || !tag) {
+ if (!imageName) {
state.toast.error(`Must specify image name and tag`)
return
}
this.pullEnabled(false)
- const result = await fetch(`/api/images/pull?imag... |
88962b9abec0eb95612d825a1b3e576e47e97348 | src/app/states/devices/device-mock.ts | src/app/states/devices/device-mock.ts | import { _ } from '@biesbjerg/ngx-translate-extract/dist/utils/utils';
import { AbstractDevice, ApparatusSensorType, DeviceType } from './abstract-device';
import { DeviceParams, DeviceParamsModel, DeviceParamType } from './device-params';
export class DeviceMock extends AbstractDevice {
readonly deviceType = Device... | import { _ } from '@biesbjerg/ngx-translate-extract/dist/utils/utils';
import { AbstractDevice, ApparatusSensorType, DeviceType } from './abstract-device';
import { DeviceParams, DeviceParamsModel, DeviceParamType } from './device-params';
export class DeviceMock extends AbstractDevice {
readonly deviceType = Device... | Fix device mock sensor UUID | Fix device mock sensor UUID
| TypeScript | apache-2.0 | openradiation/openradiation-mobile,openradiation/openradiation-mobile,openradiation/openradiation-mobile,openradiation/openradiation-mobile | ---
+++
@@ -7,7 +7,7 @@
apparatusVersion = DeviceType.Mock;
apparatusSensorType = ApparatusSensorType.Geiger;
hitsPeriod = 1000;
- sensorUuid = DeviceType.Mock;
+ sensorUUID = DeviceType.Mock;
params: DeviceParams = {
audioHits: true, |
922f5c6030d0f44380395ec88538864fa894b050 | src/app/settings/board-admin/board-admin.service.ts | src/app/settings/board-admin/board-admin.service.ts | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { ApiResponse, Board, User } from '../../shared/index';
import { BoardData } from '.... | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/of';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/catch';
import { ApiResponse, Board, User } from '../../shared/index';
import { BoardData } from '.... | Fix issue tracker bug ID not saving | Fix issue tracker bug ID not saving
| TypeScript | mit | kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard,kiswa/TaskBoard | ---
+++
@@ -42,7 +42,7 @@
});
board.issueTrackers.forEach(tracker => {
- newBoard.addIssueTracker(tracker.url, tracker.bugId);
+ newBoard.addIssueTracker(tracker.url, tracker.regex);
});
board.users.forEach(user => { |
80f8e364e1df4005e95c9e207d38d758794e37f6 | client/src/app/login/login.component.ts | client/src/app/login/login.component.ts | import { Component, OnInit } from '@angular/core'
import { FormBuilder, FormGroup, Validators } from '@angular/forms'
import { Router } from '@angular/router'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
@Component({
selector: 'my-login',
templateUrl: './login.component.html',
... | import { Component, OnInit } from '@angular/core'
import { FormBuilder, FormGroup, Validators } from '@angular/forms'
import { Router } from '@angular/router'
import { AuthService } from '../core'
import { FormReactive } from '../shared'
@Component({
selector: 'my-login',
templateUrl: './login.component.html',
... | Use server error message on login | Use server error message on login
| TypeScript | agpl-3.0 | Green-Star/PeerTube,Green-Star/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Green-Star/PeerTube,Green-Star/PeerTube | ---
+++
@@ -55,15 +55,9 @@
const { username, password } = this.form.value
this.authService.login(username, password).subscribe(
- result => this.router.navigate(['/videos/list']),
+ () => this.router.navigate(['/videos/list']),
- err => {
- if (err.message === 'invalid_grant') {
- ... |
f7dad3aa39bf5642272c8e2ea41e41a9f35f5277 | Foundation/HtmlClient/Foundation.Test.HtmlClient/Implementations/testDefaultAngularAppInitialization.ts | Foundation/HtmlClient/Foundation.Test.HtmlClient/Implementations/testDefaultAngularAppInitialization.ts | /// <reference path="../../foundation.core.htmlclient/foundation.core.d.ts" />
module Foundation.Test.Implementations {
@Core.ObjectDependency({
name: "AppEvent"
})
export class TestDefaultAngularAppInitialization extends ViewModel.Implementations.DefaultAngularAppInitialization {
protecte... | /// <reference path="../../foundation.core.htmlclient/foundation.core.d.ts" />
module Foundation.Test.Implementations {
@Core.ObjectDependency({
name: "AppEvent"
})
export class TestDefaultAngularAppInitialization extends ViewModel.Implementations.DefaultAngularAppInitialization {
public c... | Add kendo-directives module for DesktopAndTablet devices in test project | Add kendo-directives module for DesktopAndTablet devices in test project
| TypeScript | mit | bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework,bit-foundation/bit-framework | ---
+++
@@ -5,8 +5,15 @@
})
export class TestDefaultAngularAppInitialization extends ViewModel.Implementations.DefaultAngularAppInitialization {
+ public constructor( @Core.Inject("ClientAppProfileManager") public clientAppProfileManager: Core.ClientAppProfileManager) {
+ super();
+ ... |
e267646ab7fd2abc8821ba5a9e92a5d0669a6193 | applications/account/src/app/content/PrivateApp.tsx | applications/account/src/app/content/PrivateApp.tsx | import React from 'react';
import { StandardPrivateApp } from 'react-components';
import { TtagLocaleMap } from 'proton-shared/lib/interfaces/Locale';
import {
UserModel,
MailSettingsModel,
UserSettingsModel,
DomainsModel,
AddressesModel,
LabelsModel,
FiltersModel,
OrganizationModel,
... | import React from 'react';
import { StandardPrivateApp } from 'react-components';
import { TtagLocaleMap } from 'proton-shared/lib/interfaces/Locale';
import {
UserModel,
MailSettingsModel,
UserSettingsModel,
DomainsModel,
AddressesModel,
LabelsModel,
FiltersModel,
OrganizationModel,
... | Enable key activation and generation | Enable key activation and generation
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -45,6 +45,8 @@
locales={locales}
preloadModels={PRELOAD_MODELS}
eventModels={EVENT_MODELS}
+ hasPrivateMemberKeyGeneration
+ hasReadableMemberKeyActivation
>
<PrivateLayout />
</StandardPrivateApp> |
31a0197de240f741bbdb012ba7cae9d899250789 | webpack/sequences/set_active_sequence_by_name.ts | webpack/sequences/set_active_sequence_by_name.ts | import { selectAllSequences } from "../resources/selectors";
import { store } from "../redux/store";
import { urlFriendly, lastUrlChunk } from "../util";
import { selectSequence } from "./actions";
// import { push } from "../history";
export function setActiveSequenceByName() {
if (lastUrlChunk() == "sequences") { ... | import { selectAllSequences } from "../resources/selectors";
import { store } from "../redux/store";
import { urlFriendly, lastUrlChunk } from "../util";
import { selectSequence } from "./actions";
import { push } from "../history";
export function setActiveSequenceByName() {
console.log("Hmmm");
if (lastUrlChunk(... | Change URL when links get clicked in sequence editor | Change URL when links get clicked in sequence editor
| TypeScript | mit | RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,RickCarlino/farmbot-w... | ---
+++
@@ -2,15 +2,16 @@
import { store } from "../redux/store";
import { urlFriendly, lastUrlChunk } from "../util";
import { selectSequence } from "./actions";
-// import { push } from "../history";
+import { push } from "../history";
export function setActiveSequenceByName() {
+ console.log("Hmmm");
if ... |
44063a39a648f6131aae9fbb66b063474d091c18 | async/test/es6-generators.ts | async/test/es6-generators.ts | function* funcCollection<T>(): IterableIterator<T> { }
function funcMapIterator<T, E>(value: T, callback: AsyncResultCallback<T, E>) { }
function funcMapComplete<T, E>(error: E, results: T[]) { }
async.map(funcCollection(), funcMapIterator, funcMapComplete)
async.mapSeries(funcCollection(), funcMapIterator, funcMapCo... | function* funcCollection<T>(): IterableIterator<T> { }
function funcMapIterator<T, E>(value: T, callback: AsyncResultCallback<T, E>) { }
function funcMapComplete<T, E>(error: E, results: T[]) { }
function funcCbErrBoolean<T>(v: T, cb: (err: Error, res: boolean) => void) { }
async.map(funcCollection(), funcMapIterato... | Create tests for filters, selects, and rejects | Create tests for filters, selects, and rejects
* filter
* filterSeries
* filterLimit
* select
* selectSeries
* selectLimit
* reject
* rejectSeries
* rejectLimit | TypeScript | mit | mcrawshaw/DefinitelyTyped,benliddicott/DefinitelyTyped,ashwinr/DefinitelyTyped,abbasmhd/DefinitelyTyped,johan-gorter/DefinitelyTyped,zuzusik/DefinitelyTyped,jimthedev/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,QuatroCode/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,zuzusik/DefinitelyTy... | ---
+++
@@ -3,6 +3,19 @@
function funcMapIterator<T, E>(value: T, callback: AsyncResultCallback<T, E>) { }
function funcMapComplete<T, E>(error: E, results: T[]) { }
+function funcCbErrBoolean<T>(v: T, cb: (err: Error, res: boolean) => void) { }
+
async.map(funcCollection(), funcMapIterator, funcMapComplete)
as... |
a73a959de35c381b5961fca253688d2b5a60eeae | src/utils/prefixes.ts | src/utils/prefixes.ts | import { camelCase } from './camel-case';
const cache = {};
const testStyle = typeof document !== 'undefined' ? document.createElement('div').style : undefined;
// Get Prefix
// http://davidwalsh.name/vendor-prefix
const prefix = function() {
const styles = typeof window !== 'undefined' ? window.getComputedStyle(do... | import { camelCase } from './camel-case';
const cache = {};
const testStyle = typeof document !== 'undefined' ? document.createElement('div').style : undefined;
// Get Prefix
// http://davidwalsh.name/vendor-prefix
const prefix = function() {
const styles = typeof window !== 'undefined' ? window.getComputedStyle(do... | Fix prefixer function so that it doesn't fail if it cannot find vendor prefix in styles | Fix prefixer function so that it doesn't fail if it cannot find vendor prefix in styles
| TypeScript | mit | achimha/ngx-datatable,swimlane/ngx-datatable,achimha/ngx-datatable,achimha/ngx-datatable,swimlane/angular2-data-table,swimlane/angular2-data-table,swimlane/angular2-data-table,swimlane/ngx-datatable,swimlane/ngx-datatable | ---
+++
@@ -7,8 +7,9 @@
// http://davidwalsh.name/vendor-prefix
const prefix = function() {
const styles = typeof window !== 'undefined' ? window.getComputedStyle(document.documentElement, '') : undefined;
- const pre = typeof styles !== 'undefined'
- ? (Array.prototype.slice.call(styles).join('').match(/-(m... |
7822c56d8d623e03682b46a836e68e36d07053ee | src/utils/promises.ts | src/utils/promises.ts | export async function waitFor<T>(action: () => T, checkEveryMilliseconds: number, tryForMilliseconds: number, token?: { isCancellationRequested: boolean }): Promise<T | undefined> {
let timeRemaining = tryForMilliseconds;
while (timeRemaining > 0 && !(token && token.isCancellationRequested)) {
const res = action();... | export async function waitFor<T>(action: () => T, checkEveryMilliseconds: number, tryForMilliseconds: number, token?: { isCancellationRequested: boolean }): Promise<T | undefined> {
let timeRemaining = tryForMilliseconds;
while (timeRemaining > 0 && !(token && token.isCancellationRequested)) {
const res = action();... | Fix bug in waitFor not waiting long enough | Fix bug in waitFor not waiting long enough
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -5,6 +5,6 @@
if (res)
return res;
await new Promise((resolve) => setTimeout(resolve, checkEveryMilliseconds));
- timeRemaining -= 20;
+ timeRemaining -= checkEveryMilliseconds;
}
} |
e0e6771ea123c37d18f405bc17f8f11408cfb59c | polyfill/promise.ts | polyfill/promise.ts | //@ts-ignore
import Promise from "promise-polyfill";
let globalWindow = window as any;
if (globalWindow.Promise === undefined)
{
globalWindow.Promise = Promise;
}
| import "promise-polyfill/src/polyfill";
| Remove redundant global window assignment as the polyfill does it as well | Remove redundant global window assignment as the polyfill does it as well
| TypeScript | bsd-3-clause | Becklyn/mojave,Becklyn/mojave,Becklyn/mojave | ---
+++
@@ -1,9 +1 @@
-//@ts-ignore
-import Promise from "promise-polyfill";
-
-let globalWindow = window as any;
-
-if (globalWindow.Promise === undefined)
-{
- globalWindow.Promise = Promise;
-}
+import "promise-polyfill/src/polyfill"; |
7a170d51587e478afcd221af25e9dfdcd4900130 | typescript/tssearch/src/searchfile.ts | typescript/tssearch/src/searchfile.ts | /*
* searchfile.js
*
* encapsulates a file to be searched
*/
"use strict";
import {FileType} from './filetype';
var path = require('path');
export class SearchFile {
containerSeparator: string = '!';
containers: string[] = [];
pathname: string;
filename: string;
filetype: FileType;
cons... | /*
* searchfile.js
*
* encapsulates a file to be searched
*/
"use strict";
import {FileType} from './filetype';
var path = require('path');
export class SearchFile {
containerSeparator: string = '!';
containers: string[] = [];
pathname: string;
filename: string;
filetype: FileType;
cons... | Add relativePath method to SearchFile | Add relativePath method to SearchFile
| TypeScript | mit | clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch,clarkcb/xsearch | ---
+++
@@ -23,6 +23,11 @@
this.filetype = filetype;
}
+ public relativePath(): string {
+ if (this.pathname === '.' || this.pathname === './') return './' + this.filename;
+ return path.join(this.pathname, this.filename);
+ };
+
public toString(): string {
let s: str... |
d636ce25841d4f8e6cbf6ff025dc0a37fc3a151a | console/src/app/core/models/chart/mongoose-chart.interface.ts | console/src/app/core/models/chart/mongoose-chart.interface.ts | import { MongooseChartDataset } from "./mongoose-chart-dataset.model";
import { MongooseChartOptions } from "./mongoose-chart-options";
export interface MongooseChart {
chartOptions: MongooseChartOptions;
chartLabels: string[];
chartType: string;
chartLegend: boolean;
chartData: MongooseChartDataset;
} | import { MongooseChartDataset } from "./mongoose-chart-dataset.model";
import { MongooseChartOptions } from "./mongoose-chart-options";
import { MongooseChartDao } from "./mongoose-chart-dao.mode";
export interface MongooseChart {
chartOptions: MongooseChartOptions;
chartLabels: string[];
chartType: string... | Add necessary field & method to mongoose chart inteface. | Add necessary field & method to mongoose chart inteface.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -1,10 +1,14 @@
import { MongooseChartDataset } from "./mongoose-chart-dataset.model";
import { MongooseChartOptions } from "./mongoose-chart-options";
+import { MongooseChartDao } from "./mongoose-chart-dao.mode";
-export interface MongooseChart {
-chartOptions: MongooseChartOptions;
-chartLabels: str... |
38e771b1c74b0bc426022e84bd867c5fc483d388 | client/src/app/app.module.ts | client/src/app/app.module.ts | import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule, JsonpModule} from '@angular/http';
import {AppComponent} from './app.component';
import {NavbarComponent} from './navbar/navbar.component';
import {HomeComponent} from './home/home.component';
import {U... | import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule, JsonpModule} from '@angular/http';
import {AppComponent} from './app.component';
import {NavbarComponent} from './navbar/navbar.component';
import {HomeComponent} from './home/home.component';
import {Us... | Update missing import from UserComponent | Update missing import from UserComponent
| TypeScript | mit | UMM-CSci-3601-F17/interation-1-drop-table-teams,UMM-CSci-3601-F17/interation-1-drop-table-teams,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601-F17/interation-1-drop-table-teams,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601/3601-lab4_mongo,UMM-CSci-3601-F17/interation-1-drop-table-teams,UMM-CSci... | ---
+++
@@ -1,10 +1,10 @@
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {HttpModule, JsonpModule} from '@angular/http';
-
import {AppComponent} from './app.component';
import {NavbarComponent} from './navbar/navbar.component';
import {HomeComponent} from... |
a56896e7ba7bd3a1f02d11ab7a18c7afb246edac | integration/microservices/src/rmq/rmq-broadcast.controller.ts | integration/microservices/src/rmq/rmq-broadcast.controller.ts | import { Controller, Get } from '@nestjs/common';
import {
ClientProxy,
ClientProxyFactory,
MessagePattern,
Transport,
} from '@nestjs/microservices';
import { Observable } from 'rxjs';
import { scan, take } from 'rxjs/operators';
@Controller()
export class RMQBroadcastController {
client: ClientProxy;
co... | import { Controller, Get } from '@nestjs/common';
import {
ClientProxy,
ClientProxyFactory,
MessagePattern,
Transport,
} from '@nestjs/microservices';
import { Observable } from 'rxjs';
import { scan, take } from 'rxjs/operators';
@Controller()
export class RMQBroadcastController {
client: ClientProxy;
co... | Add socketOptions to RMQ broadcast test | Add socketOptions to RMQ broadcast test | TypeScript | mit | kamilmysliwiec/nest,kamilmysliwiec/nest | ---
+++
@@ -19,6 +19,7 @@
urls: [`amqp://localhost:5672`],
queue: 'test_broadcast',
queueOptions: { durable: false },
+ socketOptions: { noDelay: true },
},
});
} |
2d4590a5b59dde8ed9881f569ada58de13bd82ab | src/app/app.ts | src/app/app.ts | /*
* Angular 2 decorators and services
*/
import {Component, OnInit} from 'angular2/core';
import {NgForm, FORM_DIRECTIVES} from 'angular2/common';
import {BudgetItem} from './budget/budget-item';
import {BudgetService} from './services/budget.service';
/*
* App Component
* Top Level Component
*/
@Component({
... | /*
* Angular 2 decorators and services
*/
import {Component, OnInit} from 'angular2/core';
import {NgForm, FORM_DIRECTIVES} from 'angular2/common';
import {BudgetItem} from './budget/budget-item';
import {BudgetService} from './services/budget.service';
/*
* App Component
* Top Level Component
*/
@Component({
... | Handle empty array case for sumUp() | Handle empty array case for sumUp()
| TypeScript | mit | bluebirrrrd/ng2-budget,bluebirrrrd/ng2-budget,bluebirrrrd/ng2-budget | ---
+++
@@ -54,6 +54,6 @@
}
countTotal() {
- this.total = this.budgetItems.map(_ => _.sum).reduce((a, b) => a + b);
+ this.total = this.budgetItems.map(_ => _.sum).reduce((a, b) => a + b, 0);
}
} |
6540874092e259230083644101cb4e37380ce476 | src/contract/index.ts | src/contract/index.ts | // Copyright 2016 Joe Duffy. All rights reserved.
"use strict";
import * as process from "process";
import * as util from "util";
const failCode = -227;
const failMsg: string = "A failure has occurred";
const assertMsg: string = "An assertion failure has occurred";
export function fail(): never {
return failf(f... | // Copyright 2016 Joe Duffy. All rights reserved.
"use strict";
import * as process from "process";
import * as util from "util";
const failCode = -227;
const failMsg: string = "A failure has occurred";
const assertMsg: string = "An assertion failure has occurred";
export function fail(): never {
return failfas... | Prepend failure/assert messages to custom text | Prepend failure/assert messages to custom text
| TypeScript | mit | joeduffy/nodets | ---
+++
@@ -10,26 +10,29 @@
const assertMsg: string = "An assertion failure has occurred";
export function fail(): never {
- return failf(failMsg);
+ return failfast(failMsg);
}
export function failf(msg: string, ...args: any[]): never {
- let msgf: string = util.format(msg, ...args);
- console.er... |
c0281dce125e70a78b13a5d26dcadb00733fae03 | clients/webpage/src/bonde-webpage/plugins/Plip/components/PdfButton.tsx | clients/webpage/src/bonde-webpage/plugins/Plip/components/PdfButton.tsx | import React from 'react';
import EyeIcon from '../icons/EyeIcon';
interface PdfButtonProps {
dataPdf: string
}
const PdfButton = (props: PdfButtonProps) => {
const handleClick = (event:any) => {
event?.preventDefault()
window.open(encodeURI(props.dataPdf));
};
return (
<>
<button
... | import React from 'react';
import EyeIcon from '../icons/EyeIcon';
interface PdfButtonProps {
dataPdf: string
}
const PdfButton = (props: PdfButtonProps) => {
const handleClick = (event:any) => {
event?.preventDefault()
window.open(encodeURI(`data:application/pdf;filename=generated.pdf;base64,${props.data... | Add header when open plip pdf | chore(webpage): Add header when open plip pdf
| TypeScript | agpl-3.0 | nossas/bonde-client,nossas/bonde-client,nossas/bonde-client | ---
+++
@@ -8,7 +8,7 @@
const PdfButton = (props: PdfButtonProps) => {
const handleClick = (event:any) => {
event?.preventDefault()
- window.open(encodeURI(props.dataPdf));
+ window.open(encodeURI(`data:application/pdf;filename=generated.pdf;base64,${props.dataPdf}`));
};
return ( |
293074ae7920040ede7e01d0aec4dabbeeb864ff | server/lib/uploadx.ts | server/lib/uploadx.ts | import express from 'express'
import { getResumableUploadPath } from '@server/helpers/upload'
import { Uploadx } from '@uploadx/core'
const uploadx = new Uploadx({ directory: getResumableUploadPath() })
uploadx.getUserId = (_, res: express.Response) => res.locals.oauth?.token.user.id
export {
uploadx
}
| import express from 'express'
import { getResumableUploadPath } from '@server/helpers/upload'
import { Uploadx } from '@uploadx/core'
const uploadx = new Uploadx({
directory: getResumableUploadPath(),
// Could be big with thumbnails/previews
maxMetadataSize: '10MB'
})
uploadx.getUserId = (_, res: express.Respons... | Fix video upload with big preview | Fix video upload with big preview
| TypeScript | agpl-3.0 | Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube | ---
+++
@@ -2,7 +2,11 @@
import { getResumableUploadPath } from '@server/helpers/upload'
import { Uploadx } from '@uploadx/core'
-const uploadx = new Uploadx({ directory: getResumableUploadPath() })
+const uploadx = new Uploadx({
+ directory: getResumableUploadPath(),
+ // Could be big with thumbnails/previews
... |
b68927a5338c39f4c6a91e69cfe7f812ea149e00 | lib/vocabularies/validation/limitLength.ts | lib/vocabularies/validation/limitLength.ts | import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type KeywordCxt from "../../compile/context"
import {_, str, operators} from "../../compile/codegen"
import ucs2length from "../../compile/ucs2length"
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
con... | import type {CodeKeywordDefinition, KeywordErrorDefinition} from "../../types"
import type KeywordCxt from "../../compile/context"
import {_, str, operators} from "../../compile/codegen"
import ucs2length from "../../compile/ucs2length"
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
con... | Add user-friendly message for maxLength validation | Add user-friendly message for maxLength validation
"should not have fewer than 5 items" feels weird for a string of characters. I think we should revert back to v6 terminology and say "characters" instead of "items". | TypeScript | mit | epoberezkin/ajv,epoberezkin/ajv,epoberezkin/ajv | ---
+++
@@ -6,7 +6,7 @@
const error: KeywordErrorDefinition = {
message({keyword, schemaCode}) {
const comp = keyword === "maxLength" ? "more" : "fewer"
- return str`should NOT have ${comp} than ${schemaCode} items`
+ return str`should NOT have ${comp} than ${schemaCode} characters`
},
params: ({... |
5a44fa3ec9e275912516787b0a1ddd892b73eeea | src/utils/data/sorting.ts | src/utils/data/sorting.ts | export function sortByField (array: Array<any>, field: string){
array.sort((e1, e2) => {
var a = e1[field];
var b = e2[field];
return (a < b) ? -1 : (a > b) ? 1 : 0;
});
} | export function sortByField (array: Array<any>, field: string) : void {
array.sort((e1, e2) => {
var a = e1[field];
var b = e2[field];
return (a < b) ? -1 : (a > b) ? 1 : 0;
});
} | Add void return type to sortByField | Add void return type to sortByField
| TypeScript | apache-2.0 | proteus-h2020/proteic,proteus-h2020/proteic,proteus-h2020/proteus-charts,proteus-h2020/proteic | ---
+++
@@ -1,4 +1,4 @@
-export function sortByField (array: Array<any>, field: string){
+export function sortByField (array: Array<any>, field: string) : void {
array.sort((e1, e2) => {
var a = e1[field];
var b = e2[field]; |
3e84010c4b4fa3016ffaf5afab529aa50fe9575f | src/resourceloader.ts | src/resourceloader.ts | /**
* Map a resource name to a URL.
*
* This particular mapping function works in a nodejs context.
*
* @param resourceName relative path to the resource from the main src directory.
* @return a URL which points to the resource.
*/
export function toUrl(resourceName: string): string {
let mainPath = __dirname... | /**
* Map a resource name to a URL.
*
* This particular mapping function works in a nodejs context.
*
* @param resourceName relative path to the resource from the main src directory.
* @return a URL which points to the resource.
*/
export function toUrl(resourceName: string): string {
let mainPath = __dirname... | Fix for CSS and resource loading on Windows. | Fix for CSS and resource loading on Windows.
| TypeScript | mit | sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm | ---
+++
@@ -8,5 +8,5 @@
*/
export function toUrl(resourceName: string): string {
let mainPath = __dirname;
- return "file://" + mainPath + "/" + resourceName;
+ return "file://" + mainPath.replace(/\\/g, "/") + "/" + resourceName;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.