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 |
|---|---|---|---|---|---|---|---|---|---|---|
689f92b793124078239d103a2a10dd7724bf6676 | src/site/components/SiteHeader.tsx | src/site/components/SiteHeader.tsx | import * as React from 'react';
import * as config from '../../config';
interface Props {
pageType: string;
}
export default function SiteHeader({pageType}: Props) {
return (
<header className="site-header">
<h1 className="site-header__title">
<a href="/">
Game Boy hardware database
... | import * as React from 'react';
import * as config from '../../config';
interface Props {
pageType: string;
}
export default function SiteHeader({pageType}: Props) {
return (
<header className="site-header">
<h1 className="site-header__title">
<a href="/">
Game Boy hardware database
... | Add cartridges section to navigation | Add cartridges section to navigation
| TypeScript | mit | Gekkio/gb-hardware-db | ---
+++
@@ -20,25 +20,34 @@
)
}
-const models = config.consoles.map(type => [type.toUpperCase(), type, config.consoleCfgs[type].name])
+const models = config.consoles.map(type => [type.toUpperCase(), type, config.consoleCfgs[type].name]);
function isModel(pageType: string, code: string) {
return pageType ... |
422be766954c4204fcac9c37b263fb1182ae55d5 | src/app/app-routing.module.ts | src/app/app-routing.module.ts | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PageComponent } from './page/page.component';
const routes: Routes = [
{ path: '', redirectTo: '/main', pathMatch: 'full' },
{ path: 'main', component: PageComponent, data: {section: 'main'} ... | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { PageComponent } from './page/page.component';
const routes: Routes = [
{ path: '', redirectTo: '/main', pathMatch: 'full' },
{ path: 'main', component: PageComponent, data: {section: 'main'} ... | Add contact page to routing | Add contact page to routing
| TypeScript | mit | KeJSaR/artezian-info-web,KeJSaR/artezian-info-web,KeJSaR/artezian-info-web,KeJSaR/artezian-info-web | ---
+++
@@ -15,6 +15,7 @@
{ path: 'news', component: PageComponent, data: {section: 'news'} },
{ path: 'news/:subsection', component: PageComponent, data: {section: 'news'} },
{ path: 'form', component: PageComponent, data: {section: 'form'} },
+ { path: 'contact', ... |
a3e650fffaafffaf0792a8166cbd7947b9ef841e | src/app/app.search.service.ts | src/app/app.search.service.ts | import { Injectable } from '@angular/core';
import {Subject} from "rxjs/Rx";
@Injectable()
export class SearchService {
private searchTerm: string;
private subcategories: any;
private productType: string;
searchChange: Subject<any> = new Subject<any>();
uiChange: Subject<any> = new Subject<any>();
getSear... | import { Injectable } from '@angular/core';
import {Subject} from "rxjs/Rx";
@Injectable()
export class SearchService {
private searchTerm: string;
private subcategories: any;
private productType: string;
searchChange: Subject<any> = new Subject<any>();
uiChange: Subject<any> = new Subject<any>();
getSear... | Stop undefined terms being returned. | Stop undefined terms being returned.
| TypeScript | bsd-3-clause | UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub | ---
+++
@@ -22,10 +22,12 @@
getTermIds()
{
let termIds = [];
+ console.log('subcats: ', this.subcategories);
for (var key in this.subcategories) {
if (this.subcategories.hasOwnProperty(key)) {
let value = this.subcategories[key];
- if(value && value != "null")
+ consol... |
6adf6067eea275cf8272ba1c8ed763f89c08acd2 | tests/cases/fourslash/staticGenericOverloads1.ts | tests/cases/fourslash/staticGenericOverloads1.ts | /// <reference path='fourslash.ts'/>
////class A<T> {
//// static B<S>(v: A<S>): A<S>;
//// static B<S>(v: S): A<S>;
//// static B<S>(v: any): A<S> {
//// return null;
//// }
////}
////var a = new A<number>();
////A.B(/**/
goTo.marker();
verify.currentSignatureHelpIs('B<S>(v: A<S>): ... | /// <reference path='fourslash.ts'/>
////class A<T> {
//// static B<S>(v: A<S>): A<S>;
//// static B<S>(v: S): A<S>;
//// static B<S>(v: any): A<S> {
//// return null;
//// }
////}
////var a = new A<number>();
////A.B(a/**/
goTo.marker();
verify.currentSignatureHelpIs('B<S>(v: A<numb... | Update the test for the static generic overload | Update the test for the static generic overload
| TypeScript | apache-2.0 | popravich/typescript,hippich/typescript,hippich/typescript,fdecampredon/jsx-typescript-old-version,fdecampredon/jsx-typescript-old-version,popravich/typescript,mbebenita/shumway.ts,fdecampredon/jsx-typescript-old-version,popravich/typescript,hippich/typescript,mbebenita/shumway.ts,mbebenita/shumway.ts | ---
+++
@@ -9,10 +9,11 @@
////}
////var a = new A<number>();
-////A.B(/**/
+////A.B(a/**/
goTo.marker();
-verify.currentSignatureHelpIs('B<S>(v: A<S>): A<S>')
-// BUG 701161
-//edit.insert('a');
-//verify.currentSignatureHelpIs('B<S>(v: A<S>): A<S>');
+verify.currentSignatureHelpIs('B<S>(v: A<number>): A<numbe... |
09f5b3367467585d00cd69ab9838641b01d460cb | app/pages/home/home.ts | app/pages/home/home.ts | import {Component} from '@angular/core';
import {NavController, Alert} from 'ionic-angular';
import {LocalNotifications} from 'ionic-native';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {
}
showAlert() {
LocalNotifications.... | import {Component} from '@angular/core';
import {NavController, Alert} from 'ionic-angular';
import {LocalNotifications} from 'ionic-native';
@Component({
templateUrl: 'build/pages/home/home.html'
})
export class HomePage {
constructor(public navCtrl: NavController) {
LocalNotifications.on('click', (notifica... | Add event to check notification was clicked | Add event to check notification was clicked
and return back to app
| TypeScript | apache-2.0 | teerasej/training-ionic2-local-notification,teerasej/training-ionic2-local-notification,teerasej/training-ionic2-local-notification | ---
+++
@@ -9,12 +9,16 @@
export class HomePage {
constructor(public navCtrl: NavController) {
+ LocalNotifications.on('click', (notification, state) => {
+ alert(notification.id + " was clicked");
+ })
+
}
showAlert() {
LocalNotifications.schedule({
id: 1,
text: "Single No... |
3bf8c3974fc6ceb2546cbfa501da0386e0f421ab | src/cli.ts | src/cli.ts | import * as commander from "commander";
import { install, parseTyping, uninstall, Typing, TYPINGS_DIR } from "./index";
commander
.version(require("../package").version);
commander
.command("install <name>")
.description(`install typings to ${TYPINGS_DIR}`)
.action((name: string) => {
const t... | import * as commander from "commander";
import { install, parseTyping, uninstall, Typing, TYPINGS_DIR } from "./index";
commander
.version(require("../package").version);
commander
.command("install <name> [otherNames...]")
.description(`install typings to ${TYPINGS_DIR}`)
.action((name: string, othe... | Support installing/uninstalling more than one package at once | Support installing/uninstalling more than one package at once
| TypeScript | mit | tomshen/tsdm | ---
+++
@@ -6,24 +6,27 @@
.version(require("../package").version);
commander
- .command("install <name>")
+ .command("install <name> [otherNames...]")
.description(`install typings to ${TYPINGS_DIR}`)
- .action((name: string) => {
- const typing = parseTyping(name);
- install(typin... |
2f6a1417da2f45739ee2d74dfafa5cd5e00b1ad9 | src/component/index.ts | src/component/index.ts | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
export * from './accordion/index';
export * from '.... | export * from './accordion/index';
export * from './autosize-textarea/index';
export * from './backdrop/index';
export * from './circular-picker/index';
export * from './code-viewer/index';
export * from './color-picker/index';
export * from './color-selector/index';
export * from './content-editable/index';
export * f... | Test commit ts file without license | Test commit ts file without license
| TypeScript | apache-2.0 | DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components | ---
+++
@@ -1,11 +1,3 @@
-/*
- * @license
- * Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
- *
- * Use of this source code is governed by an Apache-2.0 license that can be
- * found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
- */
-
export * from '... |
43dde6d6aa339177ae24367f636c89d06c41054b | src/index.ts | src/index.ts | /// <reference path="../typings/index.d.ts" />
try { require("source-map-support").install(); } catch (e) { /* empty */ }
const log4js = require("log4js");
import {app, BrowserWindow} from "electron";
log4js.configure({
appenders: [{ type: "console", layout: { type: "basic" } }]
});
async function main() {
aw... | /// <reference path="../typings/index.d.ts" />
try { require("source-map-support").install(); } catch (e) { /* empty */ }
const log4js = require("log4js");
import { app, BrowserWindow } from "electron";
log4js.configure({
appenders: [{ type: "console", layout: { type: "basic" } }]
});
async function main() {
... | Fix exit when window closed | Fix exit when window closed
| TypeScript | mit | progre/chatreader,progre/chatreader,progre/chatreader | ---
+++
@@ -1,7 +1,7 @@
/// <reference path="../typings/index.d.ts" />
try { require("source-map-support").install(); } catch (e) { /* empty */ }
const log4js = require("log4js");
-import {app, BrowserWindow} from "electron";
+import { app, BrowserWindow } from "electron";
log4js.configure({
appenders: [{ ... |
29980b08e15d0ca29109fc263455b6d0f3b99ece | src/tasks/memory_monitor.ts | src/tasks/memory_monitor.ts | import { Client } from 'discord.js';
import * as cron from 'node-cron';
import { log } from '../helpers/logger';
export const startMemoryMonitor = (bot: Client): void => {
cron.schedule('45 * * * * *', () => {
log('info', bot.shard.ids[0], `memory usage - ${Math.round((process.memoryUsage().rss / 1024) / 1... | import { Client } from 'discord.js';
import * as cron from 'node-cron';
import { log } from '../helpers/logger';
export const startMemoryMonitor = (bot: Client): void => {
cron.schedule('45 * * * * *', () => {
log('info', bot.shard.ids[0], `memory usage - ${Math.round(process.memoryUsage().rss / 1024 / 102... | Fix formula for B to MB? | Fix formula for B to MB?
| TypeScript | mpl-2.0 | BibleBot/BibleBot,BibleBot/BibleBot,BibleBot/BibleBot | ---
+++
@@ -4,6 +4,6 @@
export const startMemoryMonitor = (bot: Client): void => {
cron.schedule('45 * * * * *', () => {
- log('info', bot.shard.ids[0], `memory usage - ${Math.round((process.memoryUsage().rss / 1024) / 102400) / 100} MB`);
+ log('info', bot.shard.ids[0], `memory usage - ... |
231d6a6ad59ecabc66b1bf7556782aad779fe29c | 7-redux/app/components/users-list-with-details.ts | 7-redux/app/components/users-list-with-details.ts | import {Component, CORE_DIRECTIVES} from 'angular2/angular2';
import {SimpleList} from 'InfomediaLtd/angular2-simple-list/app/components/simple-list.ts!';
import {UserView} from "../views/user-view";
import {User} from "../data/user";
import {AppStore} from "angular2-redux";
import {UserActions} from "../actions/user-... | import {Component, CORE_DIRECTIVES} from 'angular2/angular2';
import {SimpleList} from 'InfomediaLtd/angular2-simple-list/app/components/simple-list.ts!';
import {UserView} from "../views/user-view";
import {User} from "../data/user";
import {AppStore} from "angular2-redux";
import {UserActions} from "../actions/user-... | Use Actions base class to dispatch actions | Use Actions base class to dispatch actions
| TypeScript | mit | InfomediaLtd/angular2-tutorial,InfomediaLtd/angular2-tutorial,InfomediaLtd/angular2-tutorial | ---
+++
@@ -26,8 +26,7 @@
private selectCurrentUser;
- constructor(private appStore:AppStore,
- private userActions:UserActions) {
+ constructor(appStore:AppStore, userActions:UserActions) {
this.selectCurrentUser = userActions.createDispatcher(appStore, userActions.setCurrent... |
e320d274e478a8b8e52bdc63c3fd7b49ed5043f1 | src/Test/Ast/RevisionInsertion.ts | src/Test/Ast/RevisionInsertion.ts | import { expect } from 'chai'
import Up from '../../index'
import { insideDocumentAndParagraph } from './Helpers'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
import { EmphasisNode } from '../../SyntaxNodes/EmphasisNode'
import { RevisionInsertionNode } from '../../SyntaxNodes/RevisionInsertionNode'
... | import { expect } from 'chai'
import Up from '../../index'
import { insideDocumentAndParagraph } from './Helpers'
import { PlainTextNode } from '../../SyntaxNodes/PlainTextNode'
import { EmphasisNode } from '../../SyntaxNodes/EmphasisNode'
import { RevisionInsertionNode } from '../../SyntaxNodes/RevisionInsertionNode'
... | Add passing revisoin insertion test | Add passing revisoin insertion test
| TypeScript | mit | start/up,start/up | ---
+++
@@ -36,3 +36,15 @@
]))
})
})
+
+
+describe('An empty revision insertion', () => {
+ it('produces no syntax nodes', () => {
+ expect(Up.toAst('I have nothing to add: ++++')).to.be.eql(
+ insideDocumentAndParagraph([
+ new PlainTextNode('I have nothing to add: ')
+ ])
+ )
+ }... |
913aa5469010918b314c9bb8ac74353ce84dc422 | src/redux/ui/reducers.ts | src/redux/ui/reducers.ts | import { ActionShowMenu, ActionHideMenu } from './actions';
import { ActionTypes, Action } from '../actions';
export interface UIState {
isMenuShown: boolean;
isFullscreen: boolean;
}
const initialState: UIState = {
isMenuShown: false,
isFullscreen: false,
};
function handleShowMenu(state: UIState, action: A... | import { ActionShowMenu, ActionHideMenu } from './actions';
import { ActionTypes, Action } from '../actions';
export interface UIState {
isMenuShown: boolean;
isFullscreen: boolean;
}
const initialState: UIState = {
isMenuShown: false,
isFullscreen: false,
};
function handleShowMenu(state: UIState, action: A... | Hide the menu when loading a room | :lipstick: Hide the menu when loading a room
| TypeScript | mit | matthewtole/codenames,matthewtole/codenames,matthewtole/codenames | ---
+++
@@ -36,6 +36,8 @@
return { ...state, isMenuShown: false };
case ActionTypes.UI_SET_IS_FULLSCREEN:
return { ...state, isFullscreen: action.payload.isFullscreen };
+ case ActionTypes.ROOM_LOAD:
+ return { ...state, isMenuShown: false };
default:
return state;
} |
426b69811ad53a5b002056966ae1384145e27987 | test/DispatcherSpec.ts | test/DispatcherSpec.ts | import Dispatcher from '../src/Dispatcher';
import * as chai from 'chai';
const expect = chai.expect;
import * as path from 'path';
describe('Dispatcher', function () {
it.only('Dispatches to fcat', function (done) {
Dispatcher
.dispatch('fcat', ['one', 'two']
.map((f) ... | import Dispatcher from '../src/Dispatcher';
import * as chai from 'chai';
const expect = chai.expect;
import * as path from 'path';
describe('Dispatcher', function () {
it('Dispatches to fcat', function (done) {
Dispatcher
.dispatch('fcat', ['one', 'two']
.map((f) => pa... | Remove test narrowing on Dispatcher | Remove test narrowing on Dispatcher
| TypeScript | mit | hershal/fp-cli-ts,hershal/fp-cli-ts | ---
+++
@@ -6,7 +6,7 @@
import * as path from 'path';
describe('Dispatcher', function () {
- it.only('Dispatches to fcat', function (done) {
+ it('Dispatches to fcat', function (done) {
Dispatcher
.dispatch('fcat', ['one', 'two']
.map((f) => path.resolve(__dirnam... |
be53d643823473a236a2665c233d9557085f7144 | app/components/maintenance-banner/component.ts | app/components/maintenance-banner/component.ts | import { computed } from '@ember/object';
import $ from 'jquery';
import Component from '@ember/component';
import { task } from 'ember-concurrency';
import config from 'ember-get-config';
import moment from 'moment';
interface MaintenanceData {
level?: number,
message?: string,
start?: string,
end?: s... | import { computed } from '@ember/object';
import $ from 'jquery';
import Component from '@ember/component';
import { task } from 'ember-concurrency';
import config from 'ember-get-config';
import moment from 'moment';
interface MaintenanceData {
level?: number,
message?: string,
start?: string,
end?: s... | Use arrow functions when able | Use arrow functions when able
| TypeScript | apache-2.0 | hmoco/ember-osf-web,hmoco/ember-osf-web,hmoco/ember-osf-web | ---
+++
@@ -24,19 +24,13 @@
this.set('maintenance', data.maintenance);
}).restartable(),
}) {
- start = computed('maintenance.start', function(): string {
- return moment(this.get('maintenance.start')).format('lll');
- });
+ start = computed('maintenance.start', (): string => moment(thi... |
d360e2f98660e4f91e2a120f25f75395cdd50b49 | src/xrm-mock/usersettings/usersettings.mock.ts | src/xrm-mock/usersettings/usersettings.mock.ts | export class UserSettingsMock implements Xrm.UserSettings {
public defaultDashboardId: string;
public isGuidedHelpEnabled: boolean;
public isHighContrastEnabled: boolean;
public isRTL: boolean;
public languageId: number;
public securityRolePrivileges: string[];
public securityRoles: string[];
public tra... | export class UserSettingsMock implements Xrm.UserSettings {
public defaultDashboardId: string;
public isGuidedHelpEnabled: boolean;
public isHighContrastEnabled: boolean;
public isRTL: boolean;
public languageId: number;
public securityRolePrivileges: string[];
public securityRoles: string[];
public tra... | Add missing properties in getGlobalContext.userSettings | Add missing properties in getGlobalContext.userSettings
| TypeScript | mit | camelCaseDave/xrm-mock,camelCaseDave/xrm-mock | ---
+++
@@ -9,6 +9,8 @@
public transactionCurrencyId: string;
public userId: string;
public userName: string;
+ public roles: Xrm.Collection.ItemCollection<Xrm.LookupValue>;
+ public transactionCurrency: Xrm.LookupValue;
constructor(components: IUserSettingsComponents) {
this.defaultDashboardId =... |
cfda6267fc7dc7585e406e6b963bb3384909c054 | src/testing/support/createElement.ts | src/testing/support/createElement.ts | /**
* Create HTML and SVG elements from a valid HTML string.
*
* The given HTML must contain only one root element, of type `Element`.
*/
export function createElement(html: string): Element {
return document.createRange().createContextualFragment(html).firstElementChild as Element
} | /**
* Create HTML and SVG elements from a valid HTML string.
*
* NOTE The given HTML must contain only one root element, of type `Element`.
*/
export function createElement(html: string): Element {
return document.createRange().createContextualFragment(html).firstElementChild as Element
} | Change comment for consistency and clarity | Change comment for consistency and clarity
| TypeScript | agpl-3.0 | inad9300/Soil,inad9300/Soil | ---
+++
@@ -1,7 +1,7 @@
/**
* Create HTML and SVG elements from a valid HTML string.
*
- * The given HTML must contain only one root element, of type `Element`.
+ * NOTE The given HTML must contain only one root element, of type `Element`.
*/
export function createElement(html: string): Element {
return ... |
4d6952361e5b2d35513036ab5e79da5bcb5bfe81 | server/helpers/markdown.ts | server/helpers/markdown.ts | import { getSanitizeOptions, TEXT_WITH_HTML_RULES } from '@shared/core-utils'
const sanitizeOptions = getSanitizeOptions()
const sanitizeHtml = require('sanitize-html')
const markdownItEmoji = require('markdown-it-emoji/light')
const MarkdownItClass = require('markdown-it')
const markdownIt = new MarkdownItClass('def... | import { getSanitizeOptions, TEXT_WITH_HTML_RULES } from '@shared/core-utils'
const sanitizeOptions = getSanitizeOptions()
const sanitizeHtml = require('sanitize-html')
const markdownItEmoji = require('markdown-it-emoji/light')
const MarkdownItClass = require('markdown-it')
const markdownIt = new MarkdownItClass('def... | Fix multiple \n in md to plain text | Fix multiple \n in md to plain text
| TypeScript | agpl-3.0 | Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube | ---
+++
@@ -34,7 +34,7 @@
return safeHtml.replace(/<[^>]+>/g, '')
.replace(/\n$/, '')
- .replace('\n', ', ')
+ .replace(/\n/g, ', ')
}
// --------------------------------------------------------------------------- |
108a66f0dac7586f2f7871c6bb77f73cb924f2b3 | client/src/app/core/routing/redirect.service.ts | client/src/app/core/routing/redirect.service.ts | import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
import { ServerService } from '../server'
@Injectable()
export class RedirectService {
// Default route could change according to the instance configuration
static INIT_DEFAULT_ROUTE = '/videos/trending'
static DEFAULT_ROUTE = Re... | import { Injectable } from '@angular/core'
import { Router } from '@angular/router'
import { ServerService } from '../server'
@Injectable()
export class RedirectService {
// Default route could change according to the instance configuration
static INIT_DEFAULT_ROUTE = '/videos/trending'
static DEFAULT_ROUTE = Re... | Fix history back after a redirect | Fix history back after a redirect
| TypeScript | agpl-3.0 | Green-Star/PeerTube,Green-Star/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Green-Star/PeerTube,Chocobozzz/PeerTube,Chocobozzz/PeerTube,Green-Star/PeerTube | ---
+++
@@ -31,7 +31,7 @@
redirectToHomepage () {
console.log('Redirecting to %s...', RedirectService.DEFAULT_ROUTE)
- this.router.navigate([ RedirectService.DEFAULT_ROUTE ])
+ this.router.navigate([ RedirectService.DEFAULT_ROUTE ], { replaceUrl: true })
.catch(() => {
console.error(
... |
4c49e9bc8a1703dc3aa6701a51bd1bdb43c01e2e | packages/components/containers/topBanners/WelcomeV4TopBanner.tsx | packages/components/containers/topBanners/WelcomeV4TopBanner.tsx | import React from 'react';
import { c } from 'ttag';
import { APPS, SSO_PATHS } from 'proton-shared/lib/constants';
import TopBanner from './TopBanner';
import { useConfig } from '../../hooks';
const IS_INITIAL_LOGIN = [SSO_PATHS.AUTHORIZE, SSO_PATHS.LOGIN, '/'].includes(window.location.pathname);
const WelcomeV4Top... | import React from 'react';
import { c } from 'ttag';
import { APPS, SSO_PATHS } from 'proton-shared/lib/constants';
import TopBanner from './TopBanner';
import { useConfig } from '../../hooks';
import { Href } from '../../components';
const IS_INITIAL_LOGIN = [SSO_PATHS.AUTHORIZE, SSO_PATHS.LOGIN, '/'].includes(windo... | Update welcome v4 banner to includes link | Update welcome v4 banner to includes link
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -4,6 +4,7 @@
import TopBanner from './TopBanner';
import { useConfig } from '../../hooks';
+import { Href } from '../../components';
const IS_INITIAL_LOGIN = [SSO_PATHS.AUTHORIZE, SSO_PATHS.LOGIN, '/'].includes(window.location.pathname);
@@ -16,8 +17,11 @@
return (
<TopBanner class... |
35a7d8cfb6c6be4980835a5da029caf1bfc671d6 | config/config.local.ts | config/config.local.ts | import * as Config from "webpack-chain";
import * as CommonConfig from "./config.common";
import { Credentials, EnvOptions } from "./types";
function webpackConfig(options: EnvOptions = {}): Config {
// get the common configuration to start with
const config = CommonConfig.init(options);
// TIP: if you symlink... | /* tslint:disable:no-require-imports */
import * as Config from "webpack-chain";
import * as CommonConfig from "./config.common";
import { Credentials, EnvOptions } from "./types";
function webpackConfig(options: EnvOptions = {}): Config {
// get the common configuration to start with
const config = CommonConfig.... | Disable no-require-imports on config files | Disable no-require-imports on config files
| TypeScript | mit | resir014/screeps,resir014/screeps | ---
+++
@@ -1,3 +1,4 @@
+/* tslint:disable:no-require-imports */
import * as Config from "webpack-chain";
import * as CommonConfig from "./config.common"; |
a068ef8ad62426c2635cea2163dfe5ac6c558599 | front-end/src/app/components/search-form/search-form.directive.ts | front-end/src/app/components/search-form/search-form.directive.ts | import { ApiInterface } from '../../common/services/api.service';
/** @ngInject */
export function searchForm(): angular.IDirective {
return {
restrict: 'E',
scope: {},
templateUrl: 'app/components/search-form/search-form.view.html',
controller: SearchFormController,
controllerAs: 'vm',
bindT... | import { ApiInterface } from '../../common/services/api.service';
/** @ngInject */
export function searchForm():angular.IDirective {
return {
restrict: 'E',
scope: {},
templateUrl: 'app/components/search-form/search-form.view.html',
controller: SearchFormController,
controllerAs: 'vm',
bindTo... | Reduce lint warnings delete "debugger" | Reduce lint warnings
delete "debugger"
| TypeScript | mit | automaidan/judges,automaidan/judges,automaidan/judges,automaidan/judges | ---
+++
@@ -1,6 +1,6 @@
import { ApiInterface } from '../../common/services/api.service';
/** @ngInject */
-export function searchForm(): angular.IDirective {
+export function searchForm():angular.IDirective {
return {
restrict: 'E',
@@ -9,7 +9,8 @@
controller: SearchFormController,
controllerAs... |
16ef5f4b158e3339c332156a65d0a6685c9f3cfd | src/pages/home/home.e2e.ts | src/pages/home/home.e2e.ts | import { browser, by, element } from 'protractor';
class HomeObj {
public title;
constructor() {
// this.title = element(by.id('title'));
}
}
describe('App', () => {
// beforeEach(() => {
// browser.get('/');
// });
// const home: HomeObj = new HomeObj();
// it('should have a title', () => {
... | import { browser, by, element } from 'protractor';
class HomeObj {
public title;
constructor() {
// this.title = element(by.id('title'));
}
}
describe('App', () => {
// beforeEach(() => {
// browser.get('/');
// });
// const home: HomeObj = new HomeObj();
// it('should have a title', () => {
... | Add correct indentation to config files | Add correct indentation to config files
| TypeScript | mit | kojinkai/predictor-ionic,kojinkai/predictor-ionic,kojinkai/predictor-ionic,kojinkai/predictor-ionic | ---
+++
@@ -18,4 +18,5 @@
// it('should have a title', () => {
// expect((home.title).isDisplayed()).toBeTruthy();
// });
+
}); |
d2f506845e451dbb61a3e0133cb8bed68f5ce22d | src/vs/languages/html/common/html.contribution.ts | src/vs/languages/html/common/html.contribution.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.
*---------------------------------------------------------------... | Add text/ng-template to the HTML mime types to enable HTML highlighting/help in Angular templates with in <script> blocks | Add text/ng-template to the HTML mime types to enable HTML highlighting/help in Angular templates with in <script> blocks
| TypeScript | mit | matthewshirley/vscode,f111fei/vscode,joaomoreno/vscode,edumunoz/vscode,the-ress/vscode,rishii7/vscode,mjbvz/vscode,KattMingMing/vscode,f111fei/vscode,0xmohit/vscode,the-ress/vscode,Zalastax/vscode,sifue/vscode,cleidigh/vscode,ups216/vscode,eamodio/vscode,Microsoft/vscode,veeramarni/vscode,microlv/vscode,cleidigh/vscode... | ---
+++
@@ -10,7 +10,7 @@
id: 'html',
extensions: ['.html', '.htm', '.shtml', '.mdoc', '.jsp', '.asp', '.aspx', '.jshtm'],
aliases: ['HTML', 'htm', 'html', 'xhtml'],
- mimetypes: ['text/html', 'text/x-jshtm', 'text/template'],
+ mimetypes: ['text/html', 'text/x-jshtm', 'text/template', 'text/ng-template'],
mo... |
0cdd7af407f46169601ec81f396409ebc576a0c3 | platforms/platform-alexa/src/AlexaHandles.ts | platforms/platform-alexa/src/AlexaHandles.ts | import { HandleOptions, Jovo } from '@jovotech/framework';
import { AlexaRequest } from './AlexaRequest';
import { PermissionStatus } from './interfaces';
export type PermissionType = 'timers' | 'reminders';
export class AlexaHandles {
static onPermission(status: PermissionStatus, type?: PermissionType): HandleOpti... | import { HandleOptions, Jovo } from '@jovotech/framework';
import { AlexaRequest } from './AlexaRequest';
import { PermissionStatus } from './interfaces';
export type PermissionType = 'timers' | 'reminders';
export class AlexaHandles {
static onPermission(status: PermissionStatus, type?: PermissionType): HandleOpti... | Add onDialogInvoked to handle hand-off from Alexa Conversations | :sparkles: Add onDialogInvoked to handle hand-off from Alexa Conversations
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -19,4 +19,12 @@
: true),
};
}
+
+ static onDialogInvoked(): HandleOptions {
+ return {
+ global: true,
+ types: ['Dialog.API.Invoked'],
+ platforms: ['alexa'],
+ };
+ }
} |
06e7bc39ce24164e3623b6c630e79af84af1c9bb | admin/src/main/app-ui/src/app/mapping-interface.ts | admin/src/main/app-ui/src/app/mapping-interface.ts | export interface MappingValues {
OriginTissue: string;
TumorType: string;
SampleDiagnosis: string;
DataSource: string;
}
export interface Mapping {
entityId: number;
entityType: string;
mappingLabels: string[];
mappingValues: MappingValues;
mappedTerm?: any;
mapType?: any;
j... | export interface MappingValues {
OriginTissue: string;
TumorType: string;
SampleDiagnosis: string;
DataSource: string;
}
export interface Mapping {
entityId: number;
entityType: string;
mappingLabels: string[];
mappingValues: MappingValues;
mappedTerm?: any;
mapType?: any;
j... | Extend the Data Transfer Object Interface in angular to capture pagination info | Extend the Data Transfer Object Interface in angular to capture pagination info
| TypeScript | apache-2.0 | PDXFinder/pdxfinder,PDXFinder/pdxfinder,PDXFinder/pdxfinder,PDXFinder/pdxfinder | ---
+++
@@ -20,7 +20,14 @@
}
export interface MappingInterface {
+
mappings: Mapping[];
+
+ size: number;
+ totalElements: number;
+ totaPages: number;
+ page: number;
+ beginIndex: number;
+ endIndex: number;
+ currentIndex: number;
}
-
- |
72f4c0223b751e579194d44d02bbe2dc7a550a41 | src/test/model-utils.spec.ts | src/test/model-utils.spec.ts | import {fdescribe,describe,expect,fit,it,xit, inject,beforeEach, beforeEachProviders} from 'angular2/testing';
import {provide} from "angular2/core";
import {IdaiFieldObject} from "../app/model/idai-field-object";
import {ModelUtils} from "../app/model/model-utils";
/**
* @author Jan G. Wieners
*/
export function ma... | import {fdescribe,describe,expect,fit,it,xit, inject,beforeEach, beforeEachProviders} from 'angular2/testing';
import {provide} from "angular2/core";
import {IdaiFieldObject} from "../app/model/idai-field-object";
import {ModelUtils} from "../app/model/model-utils";
/**
* @author Jan G. Wieners
*/
export function ma... | Add tests for cloning objects and filtering unwanted object propierties. | Add tests for cloning objects and filtering unwanted object propierties.
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -9,7 +9,7 @@
export function main() {
describe('ModelUtils', () => {
- it('should clone an IdaiFieldObject with all of its properties',
+ it('should clone an IdaiFieldObject with all of its properties if no filter properties are given',
function(){
var ... |
82c47a0d04856a7bfea468db580a20f62a2f55cb | examples/spaceGame.ts | examples/spaceGame.ts | import { Boolean, Number, String, Literal, Array, Tuple, Record, Union, Static } from '../src/index'
const Vector = Tuple(Number, Number, Number)
type Vector = Static<typeof Vector>
const Asteroid = Record({
type: Literal('asteroid'),
location: Vector,
mass: Number,
})
type Asteroid = Static<typeof Asteroid>
c... | import { Boolean, Number, String, Literal, Array, Tuple, Record, Union, Static } from '../src/index'
const NonNegative = Number.withConstraint(n => n >= 0)
const Vector = Tuple(Number, Number, Number)
type Vector = Static<typeof Vector>
const Asteroid = Record({
type: Literal('asteroid'),
location: Vector,
mas... | Add a constraint to the example | Add a constraint to the example
| TypeScript | mit | pelotom/runtypes,typeetfunc/runtypes,pelotom/runtypes | ---
+++
@@ -1,4 +1,6 @@
import { Boolean, Number, String, Literal, Array, Tuple, Record, Union, Static } from '../src/index'
+
+const NonNegative = Number.withConstraint(n => n >= 0)
const Vector = Tuple(Number, Number, Number)
type Vector = Static<typeof Vector>
@@ -6,15 +8,15 @@
const Asteroid = Record({
t... |
3c1c688716409baf0e104ec9631b1cf3f95ccf37 | packages/lesswrong/components/posts/PostsPage/PostsPageEventData.tsx | packages/lesswrong/components/posts/PostsPage/PostsPageEventData.tsx | import React from 'react'
import { registerComponent, Components } from '../../../lib/vulcan-lib';
import Typography from '@material-ui/core/Typography'
const styles = theme => ({
metadata: {
marginTop:theme.spacing.unit*3,
...theme.typography.postStyle,
color: 'rgba(0,0,0,0.5)',
}
})
const PostsPageE... | import React from 'react'
import { registerComponent, Components } from '../../../lib/vulcan-lib';
import Typography from '@material-ui/core/Typography'
const styles = theme => ({
metadata: {
marginTop:theme.spacing.unit*3,
...theme.typography.postStyle,
color: 'rgba(0,0,0,0.5)',
}
})
const PostsPageE... | Add COVID-19 notice to event pages | Add COVID-19 notice to event pages
| TypeScript | mit | Discordius/Lesswrong2,Discordius/Telescope,Discordius/Telescope,Discordius/Telescope,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Telescope,Discordius/Lesswrong2 | ---
+++
@@ -19,6 +19,7 @@
<div className={classes.eventTimes}> <Components.EventTime post={post} dense={false} /> </div>
{ location && <div className={classes.eventLocation}> {location} </div> }
{ contactInfo && <div className={classes.eventContact}> Contact: {contactInfo} </div> }
+ <Compon... |
1dcf933dde3946397d38dde78ddc668c66d728d7 | packages/@sanity/field/src/diff/annotations/DiffAnnotationCard.tsx | packages/@sanity/field/src/diff/annotations/DiffAnnotationCard.tsx | import React, {createElement} from 'react'
import {useAnnotationColor} from './hooks'
import {AnnotationProps, AnnotatedDiffProps} from './DiffAnnotation'
import {getAnnotationAtPath} from './helpers'
interface BaseDiffAnnotationCardProps {
as?: React.ElementType | keyof JSX.IntrinsicElements
}
export type DiffAnno... | import React, {createElement} from 'react'
import {useAnnotationColor} from './hooks'
import {AnnotationProps, AnnotatedDiffProps} from './DiffAnnotation'
import {getAnnotationAtPath} from './helpers'
import {Diff, Annotation} from '../../types'
import {Path} from '../../paths'
interface BaseDiffAnnotationCardProps {
... | Fix diff/path/annotation passed down to DOM element | [field] Fix diff/path/annotation passed down to DOM element
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -2,9 +2,14 @@
import {useAnnotationColor} from './hooks'
import {AnnotationProps, AnnotatedDiffProps} from './DiffAnnotation'
import {getAnnotationAtPath} from './helpers'
+import {Diff, Annotation} from '../../types'
+import {Path} from '../../paths'
interface BaseDiffAnnotationCardProps {
as?: R... |
7699ca680dd0a6c5b81da3e1a5cc194c46e8c87c | src/app/doc/utilities/code.card.component.ts | src/app/doc/utilities/code.card.component.ts | import { Component, Input } from '@angular/core';
@Component({
selector: 'codeCard',
template: `<plrsCard sectioned title="Angular Code">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
styles: ["plrscard {margin-top: 2rem;}"]
})
export class CodeCardComponent {
@Input() public code = '';
}... | import { Component, Input } from '@angular/core';
@Component({
selector: 'codeCard',
template: `<plrsCard sectioned title="Angular Code">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
styles: [
"plrscard {margin-top: 2rem;}",
"pre {overflow: auto;}"
]
})
export class CodeC... | Allow scrolling of the code. | Allow scrolling of the code.
| TypeScript | mit | syrp-nz/angular-polaris,syrp-nz/angular-polaris,syrp-nz/angular-polaris | ---
+++
@@ -4,7 +4,10 @@
template: `<plrsCard sectioned title="Angular Code">
<pre><code>{{ code }}</code></pre>
</plrsCard>`,
- styles: ["plrscard {margin-top: 2rem;}"]
+ styles: [
+ "plrscard {margin-top: 2rem;}",
+ "pre {overflow: auto;}"
+ ]
})
export class CodeCardComp... |
b2ef9b22bb880342e7688303b698a7410ee98763 | server/src/providers/DocumentSymbolProvider.ts | server/src/providers/DocumentSymbolProvider.ts | import { DocumentSymbol, DocumentSymbolParams, IConnection } from 'vscode-languageserver';
import Provider from './Provider';
import { analyses } from '../Analyzer';
export default class DocumentSymbolProvider extends Provider {
static register(connection: IConnection) {
return new DocumentSymbolProvider(connection... | import { DocumentSymbol, DocumentSymbolParams, IConnection } from 'vscode-languageserver';
import Provider from './Provider';
import { analyses } from '../Analyzer';
export default class DocumentSymbolProvider extends Provider {
static register(connection: IConnection) {
return new DocumentSymbolProvider(connection... | Remove document symbol console.log statement | Remove document symbol console.log statement
| TypeScript | mit | rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby | ---
+++
@@ -19,7 +19,6 @@
textDocument: { uri },
} = params;
const analysis = analyses.getAnalysis(uri);
- console.log(JSON.stringify(analysis.documentSymbols));
return analysis.documentSymbols;
};
} |
c6feaa016a92ff3ef9ba36ea6694a43f04712e2d | tests/cases/fourslash/completionListImplementingInterfaceFunctions.ts | tests/cases/fourslash/completionListImplementingInterfaceFunctions.ts | /// <reference path="fourslash.ts" />
////interface I1 {
//// a(): void;
//// b(): void;
////}
////
////var imp1: I1 {
//// a() {},
//// /*0*/
////}
////
////interface I2 {
//// a(): void;
//// b(): void;
////}
////
////var imp2: I2 {
//// a: () => {},
//// /*1*/
////}
goTo.marker("0");
verify... | /// <reference path="fourslash.ts" />
////interface I1 {
//// a(): void;
//// b(): void;
////}
////
////var imp1: I1 {
//// a() {},
//// /*0*/
////}
////
////var imp2: I1 {
//// a: () => {},
//// /*1*/
////}
goTo.marker("0");
verify.not.completionListContains("a");
goTo.marker("1");
verify.not.compl... | Remove unnecessary I2 from test case | Remove unnecessary I2 from test case
| TypeScript | apache-2.0 | microsoft/TypeScript,DLehenbauer/TypeScript,weswigham/TypeScript,jeremyepling/TypeScript,kitsonk/TypeScript,erikmcc/TypeScript,mihailik/TypeScript,nycdotnet/TypeScript,kimamula/TypeScript,kpreisser/TypeScript,DLehenbauer/TypeScript,ziacik/TypeScript,synaptek/TypeScript,erikmcc/TypeScript,minestarks/TypeScript,mmoskal/T... | ---
+++
@@ -10,12 +10,7 @@
//// /*0*/
////}
////
-////interface I2 {
-//// a(): void;
-//// b(): void;
-////}
-////
-////var imp2: I2 {
+////var imp2: I1 {
//// a: () => {},
//// /*1*/
////} |
811a44e5fd539d6dd1da83ec807795e9c40d850a | src/app/model/SearchQuery.ts | src/app/model/SearchQuery.ts | /**
* Created by user on 4/7/2017.
*/
export class Rule {
condition = 'equal';
field = 'all_fields';
data = '';
data2 = '';
query: SearchQuery = null;
}
export class SearchQuery {
operator = 'AND';
rules: Rule[] = [];
constructor() {
const rule: Rule = new Rule();
thi... | /**
* Created by user on 4/7/2017.
*/
export class Rule {
condition = 'equal';
field = 'all_fields';
data = '';
data2 = '';
query: SearchQuery = null;
}
export class SearchQuery {
operator = 'AND';
rules: Rule[] = [];
constructor() {
const rule: Rule = new Rule();
thi... | Fix facet selecting not worked | Fix facet selecting not worked
| TypeScript | unknown | BD2K-DDI/ddi-web-app,OmicsDI/ddi-web-app,OmicsDI/ddi-web-app,BD2K-DDI/ddi-web-app,OmicsDI/ddi-web-app | ---
+++
@@ -43,6 +43,9 @@
}
if (rule.field === 'all_fields') {
+ if (strtemp[0] === '"') {
+ strtemp = strtemp.slice(1, strtemp.length - 1);
+ }
str += strtemp;
} else {
... |
0ad3e930c5bf430b1fc5210b99706e6ab4639041 | packages/tux/src/services/editor.ts | packages/tux/src/services/editor.ts | const schema = new Map()
export interface Field {
field: string,
label: string,
component: React.ReactElement<any>,
props?: Object
}
export interface Meta {
type: string,
editorSchema?: Array<Field>,
name?: string,
}
export function registerEditable(type: string,
value: Array<Object> | ((editorSchema... | const schema = new Map()
export interface Field {
field: string,
label: string,
component: React.ReactElement<any>,
props?: Object
}
export interface Meta {
type: string,
editorSchema?: Array<Field>,
name?: string,
}
export function registerEditable(
type: string,
value: Array<Field> | ((editorSche... | Change expected type of value in registerEditable | Change expected type of value in registerEditable
| TypeScript | mit | aranja/tux,aranja/tux,aranja/tux | ---
+++
@@ -13,8 +13,10 @@
name?: string,
}
-export function registerEditable(type: string,
- value: Array<Object> | ((editorSchema: Map<string, Field>) => Map<string, Field>)) {
+export function registerEditable(
+ type: string,
+ value: Array<Field> | ((editorSchema: Map<string, Field>) => Map<string, Fiel... |
143ac55a08c94b524581d4a8cbe0a48d40f834b6 | src/providers/sentry-error.ts | src/providers/sentry-error.ts | import { IonicErrorHandler } from 'ionic-angular';
import Raven from 'raven-js';
Raven
.config('https://54c01f896cbb4594b75639dfbf59b81e@sentry.io/155883')
.install();
// Sentry.io error handling
export class SentryErrorHandler extends IonicErrorHandler {
handleError(error) {
super.handleError(err... | import { IonicErrorHandler } from 'ionic-angular';
import Raven from 'raven-js';
// only initialize Sentry.io if on actual device
if ((<any>window).cordova)
Raven
.config('https://54c01f896cbb4594b75639dfbf59b81e@sentry.io/155883')
.install();
// Sentry.io error handling
export class SentryErrorHa... | Disable error logging in dev | Disable error logging in dev
| TypeScript | mit | longzheng/mypal-ionic,longzheng/mypal-ionic,longzheng/mypal-ionic | ---
+++
@@ -1,9 +1,11 @@
import { IonicErrorHandler } from 'ionic-angular';
import Raven from 'raven-js';
-Raven
- .config('https://54c01f896cbb4594b75639dfbf59b81e@sentry.io/155883')
- .install();
+// only initialize Sentry.io if on actual device
+if ((<any>window).cordova)
+ Raven
+ .config('htt... |
86047a7206c60e7964e7108f7aab758bc485bd5b | tests/cases/fourslash/superInsideInnerClass.ts | tests/cases/fourslash/superInsideInnerClass.ts | / / / < |