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 |
|---|---|---|---|---|---|---|---|---|---|---|
c456248294415fec6542897b7fddd7e5c491fffb | src/app/models/workout.ts | src/app/models/workout.ts | import { Tag } from './tag';
import { Sport } from './sport';
import { Address } from './address';
import { Image } from './image';
export class Workout {
public id: number;
public startdate: Date;
public enddate: Date;
public duration: string;
public placeType: string;
public nbTicketAvailable... | import { Tag } from './tag';
import { Sport } from './sport';
import { Address } from './address';
import { Image } from './image';
export class Workout {
public id: number;
public startdate: Date;
public enddate: Date;
public duration: string;
public placeType: string;
public nbTicketAvailable... | Add new attributes to give more information to user | Add new attributes to give more information to user
| TypeScript | mit | XavierGuichet/bemoove-front,XavierGuichet/bemoove-front,XavierGuichet/bemoove-front | ---
+++
@@ -21,6 +21,8 @@
public notation: number;
public address: any;
public description: string;
+ public outfit: string;
+ public notice: string;
public tags: any[];
public addedExistingTags: Tag[];
public addedNewTags: Tag[]; |
eb2dcd559d3af878626c261c07494270f5c12ff7 | extensions/TLDRPages/src/PageDatabase.jest.ts | extensions/TLDRPages/src/PageDatabase.jest.ts | /*
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import { PageDatabase } from "./PageDatabase.js";
test("Scan", async () => {
const db = new PageDatabase("./data/pages");
await db.loadIndex();
const ... | /*
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import { PageDatabase } from "./PageDatabase.js";
test("Scan", async () => {
const db = new PageDatabase("./data/pages");
await db.loadIndex();
const ... | Update a unit test because the TL;DR database changed slighty | Update a unit test because the TL;DR database changed slighty
| TypeScript | mit | sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm | ---
+++
@@ -17,7 +17,7 @@
const info = await db.getPageInfoByName("cd", "windows");
- expect(info.examples.length).toBe(4);
+ expect(info.examples.length).toBe(5);
expect(info.examples[0].commandLine).toMatch(/^[^`].*[^`]$/);
expect(info.examples[0].description).toMatch(/^.*[^:]$/);
}); |
62094499f6ad6b48229f06201b4c5fefee560c23 | functions/src/twitter/firestore-data.ts | functions/src/twitter/firestore-data.ts | export interface Tweet {
id: string
text: string
createdAt: Date
displayTextRange: [number, number]
user: User
entities: {
hashtags: Hashtag[]
media: Media[]
urls: Url[]
userMentions: UserMention[]
}
}
export interface User {
id: string
name: string
... | export interface FirestoreTweet {
id: string
text: string
createdAt: Date
displayTextRange: [number, number]
user: FirestoreUser
entities: {
hashtags: FirestoreHashtag[]
media: FirestoreMedia[]
urls: FirestoreUrl[]
userMentions: FirestoreUserMention[]
}
}
exp... | Tweak Twitter Firestore model names | Tweak Twitter Firestore model names
| TypeScript | apache-2.0 | squanchy-dev/squanchy-firebase,squanchy-dev/squanchy-firebase | ---
+++
@@ -1,42 +1,42 @@
-export interface Tweet {
+export interface FirestoreTweet {
id: string
text: string
createdAt: Date
displayTextRange: [number, number]
- user: User
+ user: FirestoreUser
entities: {
- hashtags: Hashtag[]
- media: Media[]
- urls: Url[]
- ... |
713bc3281fe491dfafc65b2b15b497422a75d206 | src/xrm-mock/organizationsettings/organizationsettings.mock.ts | src/xrm-mock/organizationsettings/organizationsettings.mock.ts | export class OrganizationSettingsMock implements Xrm.OrganizationSettings {
public baseCurrencyId: string;
public defaultCountryCode: string;
public isAutoSaveEnabled: boolean;
public languageId: number;
public organizationId: string;
public uniqueName: string;
public useSkypeProtocol: boolean;
constru... | export class OrganizationSettingsMock implements Xrm.OrganizationSettings {
public baseCurrencyId: string;
public defaultCountryCode: string;
public isAutoSaveEnabled: boolean;
public languageId: number;
public organizationId: string;
public uniqueName: string;
public useSkypeProtocol: boolean;
public b... | Add missing properties in getGlobalContext.organizationSettings | Add missing properties in getGlobalContext.organizationSettings
| TypeScript | mit | camelCaseDave/xrm-mock,camelCaseDave/xrm-mock | ---
+++
@@ -6,6 +6,8 @@
public organizationId: string;
public uniqueName: string;
public useSkypeProtocol: boolean;
+ public baseCurrency: Xrm.LookupValue;
+ public attributes: any;
constructor(components: IOrganizationSettingsComponents) {
this.baseCurrencyId = components.baseCurrencyId;
@@ -15,... |
394ebd8b7ac2a8ee96475372fc458858c8e44974 | src/graphql/GraphQLUser.ts | src/graphql/GraphQLUser.ts | import {
UserProfileType,
} from './GraphQLUserProfile'
import {
CVType,
} from './GraphQLCV'
import {
GraphQLObjectType,
} from 'graphql'
import {
CVActions,
CVActionsImpl,
} from './../controllers'
const cvCtrl: CVActions = new CVActionsImpl()
export const UserType = new GraphQLObjectType({
name : 'User... | import {
UserProfileType,
} from './GraphQLUserProfile'
import {
CVType,
} from './GraphQLCV'
import {
GraphQLObjectType,
} from 'graphql'
import {
CVActions,
CVActionsImpl,
} from './../controllers'
const cvCtrl: CVActions = new CVActionsImpl()
export const UserType = new GraphQLObjectType({
name : 'User... | Return null for cv if not authenticated | Return null for cv if not authenticated
| TypeScript | mit | studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord,studieresan/overlord | ---
+++
@@ -21,7 +21,9 @@
cv: {
type: CVType,
resolve(user, b, { req }) {
- return cvCtrl.getCV(user.id)
+ return req.isAuthenticated()
+ ? cvCtrl.getCV(user.id)
+ : undefined
},
},
}, |
f7f09115bd49172f9869e2910eff055b544b63aa | app/src/ui/preferences/advanced.tsx | app/src/ui/preferences/advanced.tsx | import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
interface IAdvancedPreferencesProps {
readonly dispatcher: Dispatcher
}
interface IAdvancedPreferencesState {
readonly reportingOptOu... | import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
import { LinkButton } from '../lib/link-button'
interface IAdvancedPreferencesProps {
readonly dispatcher: Dispatcher
}
interface IAdva... | Make label text make sense | Make label text make sense
| TypeScript | mit | shiftkey/desktop,hjobrien/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,say25/desktop,j-f1/forked-desktop,BugTesterTest/desktops,artivilla/desktop,gengjiawen/desktop,gengjiawen/desktop,BugTesterTest/desktops,desktop/desktop,desktop/desktop,hjobrien/desktop,gengjiawen/desktop,kactus-io/kactus,j-f1/forked-de... | ---
+++
@@ -2,6 +2,7 @@
import { Dispatcher } from '../../lib/dispatcher'
import { DialogContent } from '../dialog'
import { Checkbox, CheckboxValue } from '../lib/checkbox'
+import { LinkButton } from '../lib/link-button'
interface IAdvancedPreferencesProps {
readonly dispatcher: Dispatcher
@@ -10,6 +11,8 @... |
8b1e28d6e9a440ff1b1538d3754d0e43e02cc18a | src/v2/Apps/Consign/Routes/SubmissionFlow/ThankYou/ThankYou.tsx | src/v2/Apps/Consign/Routes/SubmissionFlow/ThankYou/ThankYou.tsx | import { FC } from "react";
import { Button, Flex, Text, Spacer, Box } from "@artsy/palette"
import { FAQ } from "../../MarketingLanding/Components/FAQ"
import { SoldRecentlyQueryRenderer } from "../../MarketingLanding/Components/SoldRecently"
import { RouterLink } from "v2/System/Router/RouterLink"
export const Thank... | import { Button, Flex, Text, Spacer, Box } from "@artsy/palette"
import { FAQ } from "../../MarketingLanding/Components/FAQ"
import { SoldRecentlyQueryRenderer } from "../../MarketingLanding/Components/SoldRecently"
import { RouterLink } from "v2/System/Router/RouterLink"
export const ThankYou: React.FC = () => {
re... | Fix pageview event double fires | Fix pageview event double fires
| TypeScript | mit | artsy/force-public,artsy/force,artsy/force,artsy/force,artsy/force-public,artsy/force | ---
+++
@@ -1,10 +1,9 @@
-import { FC } from "react";
import { Button, Flex, Text, Spacer, Box } from "@artsy/palette"
import { FAQ } from "../../MarketingLanding/Components/FAQ"
import { SoldRecentlyQueryRenderer } from "../../MarketingLanding/Components/SoldRecently"
import { RouterLink } from "v2/System/Router... |
0d84e5b5bf4cbd198a80e51979552980d2c28fc5 | src/app/app.component.ts | src/app/app.component.ts | import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'app works!';
}
| import { Component } from '@angular/core';
import { User } from './models/user.model';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
user: User = new User('Godson', 'vor.nachname@gmail.com', '+234-809-613-2999');
con... | Create user model for Demo | chore(User): Create user model for Demo
| TypeScript | mit | gottsohn/md-input-inline,gottsohn/md-input-inline,gottsohn/md-input-inline | ---
+++
@@ -1,10 +1,13 @@
import { Component } from '@angular/core';
+import { User } from './models/user.model';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
+
export class AppComponent {
- title = 'app works!';
+ user: User = new User... |
eb73d9d45efaa8f6daef2a6fbae7afd25b8dd378 | client/Encounter/UpdateLegacySavedEncounter.ts | client/Encounter/UpdateLegacySavedEncounter.ts | import { CombatantState } from "../../common/CombatantState";
import { EncounterState } from "../../common/EncounterState";
import { probablyUniqueString } from "../../common/Toolbox";
function updateLegacySavedCreature(savedCreature: any) {
if (!savedCreature.StatBlock) {
savedCreature.StatBlock = savedCreature... | import { CombatantState } from "../../common/CombatantState";
import { EncounterState } from "../../common/EncounterState";
import { probablyUniqueString } from "../../common/Toolbox";
import { AccountClient } from "../Account/AccountClient";
function updateLegacySavedCreature(savedCreature: any) {
if (!savedCreatur... | Apply Id if SavedEncounter is missing one | Apply Id if SavedEncounter is missing one
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -1,6 +1,7 @@
import { CombatantState } from "../../common/CombatantState";
import { EncounterState } from "../../common/EncounterState";
import { probablyUniqueString } from "../../common/Toolbox";
+import { AccountClient } from "../Account/AccountClient";
function updateLegacySavedCreature(savedCrea... |
2d4d8626f2a03e3101d48ea79f07be6c127bcae6 | coffee-chats/src/main/webapp/src/util/fetch.ts | coffee-chats/src/main/webapp/src/util/fetch.ts | import React from "react";
interface ResponseRaceDetect {
response: Response;
json: any;
raceOccurred: boolean;
}
const fetchAndDetectRaces: (url: string) => Promise<ResponseRaceDetect> = (() => {
let requestId = 0;
return async (url: string) => {
const currentRequestId = ++requestId;
const respon... | import React from "react";
/**
* A hook that fetches JSON data from a URL using a GET request
*
* @param url: URL to fetch data from
*/
export function useFetch(url: string): any {
const [data, setData] = React.useState(null);
const requestId = React.useRef(0);
React.useEffect(() => {
(async () => {
... | Use useRef for race detection in useFetch | Use useRef for race detection in useFetch
| TypeScript | apache-2.0 | googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020,googleinterns/step250-2020 | ---
+++
@@ -1,24 +1,4 @@
import React from "react";
-
-interface ResponseRaceDetect {
- response: Response;
- json: any;
- raceOccurred: boolean;
-}
-
-const fetchAndDetectRaces: (url: string) => Promise<ResponseRaceDetect> = (() => {
- let requestId = 0;
-
- return async (url: string) => {
- const currentRe... |
ac671654c98c60ae736db51dcaed3c7c073c1198 | apps/ui-tests-app/nordic/nordic.ts | apps/ui-tests-app/nordic/nordic.ts | var vmModule = require("./main-view-model");
function pageLoaded(args) {
var page = args.object;
page.getViewById("label").text = "æøå";
}
exports.pageLoaded = pageLoaded; | function pageLoaded(args) {
var page = args.object;
page.getViewById("label").text = "æøå";
}
exports.pageLoaded = pageLoaded; | Remove unnecessary require in ui-tests-app. | Remove unnecessary require in ui-tests-app.
| TypeScript | mit | NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,NativeScript/NativeScript,hdeshev/NativeScript,hdeshev/NativeScript,hdeshev/NativeScript | ---
+++
@@ -1,5 +1,4 @@
-var vmModule = require("./main-view-model");
-function pageLoaded(args) {
+function pageLoaded(args) {
var page = args.object;
page.getViewById("label").text = "æøå";
} |
b6b49f736fa3f4d72e3ec7909a2332562da0a436 | response-time/response-time-tests.ts | response-time/response-time-tests.ts |
import express = require('express');
import responseTime = require('response-time');
var app = express();
app.use(responseTime());
app.use(responseTime({
digits: 3,
header: 'X-Response-Time',
suffix: true
}));
| import responseTime = require('response-time');
////////////////////////////////////////////////////////////////////////////////////
// expressconnect tests https://github.com/expressjs/response-time#expressconnect //
////////////////////////////////////////////////////////////////////////////////////
import express ... | Use official examples as tests | Use official examples as tests | TypeScript | mit | alexdresko/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,georgemarshall/DefinitelyTyped,zuzusik/DefinitelyTyped,aciccarello/DefinitelyTyped,magny/DefinitelyTyped,martinduparc/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,QuatroCode/DefinitelyTyped,georgemarshall/DefinitelyTyped,AbraaoAlves... | ---
+++
@@ -1,11 +1,41 @@
+import responseTime = require('response-time');
-import express = require('express');
-import responseTime = require('response-time');
-var app = express();
-app.use(responseTime());
-app.use(responseTime({
- digits: 3,
- header: 'X-Response-Time',
- suffix: true
-}));
+///////... |
49f815c4aa51326dc712815f540ef1b21291485d | packages/auth/src/commands/auth/2fa/disable.ts | packages/auth/src/commands/auth/2fa/disable.ts | import {Command} from '@heroku-cli/command'
import * as Heroku from '@heroku-cli/schema'
import ux from 'cli-ux'
export default class Auth2faGenerate extends Command {
static description = 'disables 2fa on account'
static aliases = [
'twofactor:disable',
'2fa:disable',
]
static example = `$ heroku au... | import {Command} from '@heroku-cli/command'
import * as Heroku from '@heroku-cli/schema'
import ux from 'cli-ux'
export default class Auth2faGenerate extends Command {
static description = 'disables 2fa on account'
static aliases = [
'twofactor:disable',
'2fa:disable',
]
static example = `$ heroku au... | Add helpful error message for VaaS MFA users | Add helpful error message for VaaS MFA users
* Soon, we will roll out a beta where users can have MFA/2FA for their
Heroku Accounts using VaaS (verification as a service), a Salesforce
platform that all clouds are adopting.
* In the next few months, we will migrate all existing Heroku 2FA users
over to VaaS. The... | TypeScript | isc | heroku/cli,heroku/heroku-cli,heroku/cli,heroku/heroku-cli,heroku/cli,heroku/heroku-cli,heroku/heroku-cli,heroku/cli | ---
+++
@@ -15,8 +15,13 @@
async run() {
ux.action.start('Disabling 2fa')
- const {body: account} = await this.heroku.get<Heroku.Account>('/account')
+ const {body: account} = await this.heroku.get<Heroku.Account>('/account'), {
+ headers: {
+ Accept: 'application/vnd.heroku+json; vers... |
69dc47668310c9e3f6c4a78723d39fc047c55a2e | test/property-decorators/min.spec.ts | test/property-decorators/min.spec.ts | import { Min } from './../../src/';
describe('LoggerMethod decorator', () => {
it('should assign a valid value (greater or equals than min value)', () => {
class TestClassMinValue {
@Min(5)
myNumber: number;
}
let testClass = new TestClassMinValue();
testCl... | import { Min } from './../../src/';
describe('LoggerMethod decorator', () => {
it('should assign a valid value (greater or equals than min value)', () => {
class TestClassMinValue {
@Min(5)
myNumber: number;
}
let testClass = new TestClassMinValue();
let va... | Add unit tests for min decorator | Add unit tests for min decorator
| TypeScript | mit | semagarcia/typescript-decorators,semagarcia/typescript-decorators | ---
+++
@@ -9,8 +9,9 @@
}
let testClass = new TestClassMinValue();
- testClass.myNumber = 5;
- expect(testClass.myNumber).toEqual(5);
+ let valueToAssign = 5;
+ testClass.myNumber = valueToAssign;
+ expect(testClass.myNumber).toEqual(valueToAssign);
});
... |
f645ddb31ad034f672312713955d30964acf2ee7 | components/layout.tsx | components/layout.tsx | import Head from 'next/head'
import Link from 'next/link'
export default function Layout({
children,
title
}: {
children: React.ReactNode
title?: string
}) {
return (
<>
<Head>
<title>{title && title + " | "}Kevin Plattret, Software Engineer</title>
<link rel="apple-touch-icon" siz... | import Head from 'next/head'
import Link from 'next/link'
export default function Layout({
children,
title
}: {
children: React.ReactNode
title?: string
}) {
const github = <a href="https://github.com/kplattret/kevinplattret.com">GitHub</a>
const email = <a href="mailto:kevin@plattret.com">email</a>
cons... | Store footer links in constances | Store footer links in constances
It can be a bit tricky to format the code within an HTML elements in the
`return` function, especially when using nested elements. This moves
`<a>` tags outside of the footer and stores them in constances, which
helps keep the code neat and tidy.
| TypeScript | mit | kplattret/kplattret.github.io,kplattret/kplattret.github.io | ---
+++
@@ -8,6 +8,10 @@
children: React.ReactNode
title?: string
}) {
+ const github = <a href="https://github.com/kplattret/kevinplattret.com">GitHub</a>
+ const email = <a href="mailto:kevin@plattret.com">email</a>
+ const pgpKey = <a href="https://keys.openpgp.org/search?q=kevin@plattret.com">PGP key</a... |
e347c3711cc4b85eda34f1aba844e1a6576ff40c | tests/cases/fourslash/jsDocGenerics1.ts | tests/cases/fourslash/jsDocGenerics1.ts | ///<reference path="fourslash.ts" />
// @allowNonTsExtensions: true
// @Filename: Foo.js
//// /** @type {Array<number>} */
//// var v;
//// v[0]./**/
goTo.marker();
verify.memberListContains("toFixed", /*displayText:*/ undefined, /*documentation*/ undefined, "method");
| ///<reference path="fourslash.ts" />
// @allowNonTsExtensions: true
// @Filename: ref.d.ts
//// namespace Thing {
//// export interface Thung {
//// a: number;
//// ]
//// ]
// @Filename: Foo.js
////
//// /** @type {Array<number>} */
//// var v;
//// v[0]./*1*/
////
//// /** @type {{... | Add more complex test scenarios | Add more complex test scenarios
| TypeScript | apache-2.0 | blakeembrey/TypeScript,plantain-00/TypeScript,nojvek/TypeScript,alexeagle/TypeScript,nycdotnet/TypeScript,vilic/TypeScript,RyanCavanaugh/TypeScript,minestarks/TypeScript,erikmcc/TypeScript,kitsonk/TypeScript,vilic/TypeScript,synaptek/TypeScript,jwbay/TypeScript,Eyas/TypeScript,chuckjaz/TypeScript,TukekeSoft/TypeScript,... | ---
+++
@@ -1,10 +1,34 @@
///<reference path="fourslash.ts" />
// @allowNonTsExtensions: true
+// @Filename: ref.d.ts
+//// namespace Thing {
+//// export interface Thung {
+//// a: number;
+//// ]
+//// ]
+
+
// @Filename: Foo.js
+////
//// /** @type {Array<number>} */
//// var v;
-//// v[0]./... |
cda76a556d5b408cbc3c434260f2b550aee4e754 | packages/react-day-picker/src/hooks/useSelection/useSelectRange.ts | packages/react-day-picker/src/hooks/useSelection/useSelectRange.ts | import { useState } from 'react';
import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types';
import { DateRange } from '../../types/DateRange';
import { addToRange } from './utils/addToRange';
export type RangeSelectionHandler = (day: Date) => void;
export type UseRangeSelect = {
selected: Dat... | import { useState } from 'react';
import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types';
import { DateRange } from '../../types/DateRange';
import { addToRange } from './utils/addToRange';
export type UseRangeSelect = {
selected: DateRange | undefined;
onDayClick: DayClickEventHandler;
... | Fix wrong type in callback | Fix wrong type in callback
| TypeScript | mit | gpbl/react-day-picker,gpbl/react-day-picker,gpbl/react-day-picker | ---
+++
@@ -3,8 +3,6 @@
import { DayClickEventHandler, ModifierStatus, SelectMode } from '../../types';
import { DateRange } from '../../types/DateRange';
import { addToRange } from './utils/addToRange';
-
-export type RangeSelectionHandler = (day: Date) => void;
export type UseRangeSelect = {
selected: Date... |
48ded60d03501333d9e2d1983e7808feeefff5b0 | app/src/lib/fix-emoji-spacing.ts | app/src/lib/fix-emoji-spacing.ts | // This module renders an element with an emoji using
// a non system-default font to workaround an Chrome
// issue that causes unexpected spacing on emojis.
// More info:
// https://bugs.chromium.org/p/chromium/issues/detail?id=1113293
const container = document.createElement('div')
container.setAttribute(
'style',... | // This module renders an element with an emoji using
// a non system-default font to workaround an Chrome
// issue that causes unexpected spacing on emojis.
// More info:
// https://bugs.chromium.org/p/chromium/issues/detail?id=1113293
const container = document.createElement('div')
container.setAttribute(
'style',... | Use `style.setProperty()` method to apply style | Use `style.setProperty()` method to apply style
Co-authored-by: Markus Olsson <fea8a6992108b6bfda0c59222a1afb2da2ede904@gmail.com> | TypeScript | mit | shiftkey/desktop,artivilla/desktop,j-f1/forked-desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,artivilla/desktop,say25/desktop,desktop/desktop,kactus-io/kactus,desktop/desktop,kactus-io/kactus,say25/desktop,say25/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,artivilla/desktop,kactus-io/kac... | ---
+++
@@ -24,7 +24,8 @@
for (const fontSize of fontSizes) {
const span = document.createElement('span')
- span.setAttribute('style', `font-size: var(${fontSize});`)
+ span.style.setProperty('fontSize', `var(${fontSize}`)
+ span.style.setProperty('font-family', 'Arial', 'important')
span.textContent = '�... |
1ed46d21d7b8847eeb13f410e9e8207d9d166f1c | src/test/runTests.ts | src/test/runTests.ts | import { resolve } from "path";
import { runTests } from "vscode-test";
import { TestOptions } from "vscode-test/out/runTest";
(async function main()
{
let environmentPath = resolve(__dirname, "..", "..", "src", "test");
let commonOptions: TestOptions = {
extensionDevelopmentPath: resolve(__dirname, "... | import { resolve } from "path";
import { runTests } from "vscode-test";
import { TestOptions } from "vscode-test/out/runTest";
(async function main()
{
let environmentPath = resolve(__dirname, "..", "..", "src", "test");
let commonArgs: string[] = [
"--disable-gpu",
"--headless",
"--no... | Add arguments for enabling headless vscode testing | Add arguments for enabling headless vscode testing
| TypeScript | mit | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | ---
+++
@@ -5,6 +5,12 @@
(async function main()
{
let environmentPath = resolve(__dirname, "..", "..", "src", "test");
+
+ let commonArgs: string[] = [
+ "--disable-gpu",
+ "--headless",
+ "--no-sandbox"
+ ];
let commonOptions: TestOptions = {
extensionDevelopmentPath... |
f92a95a7574d0196ac8f77bc07273212d7cb4225 | packages/components/components/v2/input/PasswordInput.tsx | packages/components/components/v2/input/PasswordInput.tsx | import { useState } from 'react';
import { c } from 'ttag';
import Icon from '../../icon/Icon';
import InputTwo, { InputTwoProps } from './Input';
const PasswordInputTwo = ({ disabled, ...rest }: Omit<InputTwoProps, 'type'>) => {
const [type, setType] = useState('password');
const toggle = () => {
set... | import { useState } from 'react';
import { c } from 'ttag';
import Icon from '../../icon/Icon';
import InputTwo, { InputTwoProps } from './Input';
type PasswordType = 'password' | 'text';
interface Props extends Omit<InputTwoProps, 'type'> {
defaultType?: PasswordType;
}
const PasswordInputTwo = ({ disabled, de... | Add default type on inputs | Add default type on inputs
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -4,8 +4,14 @@
import Icon from '../../icon/Icon';
import InputTwo, { InputTwoProps } from './Input';
-const PasswordInputTwo = ({ disabled, ...rest }: Omit<InputTwoProps, 'type'>) => {
- const [type, setType] = useState('password');
+type PasswordType = 'password' | 'text';
+
+interface Props extend... |
ec0bef50908f9c6dfd7de2bc5c02bf667c0fe452 | src/fuzzerFactory/__tests__/FunctionFuzzerFactory.spec.ts | src/fuzzerFactory/__tests__/FunctionFuzzerFactory.spec.ts | import {FunctionFuzzer} from "../../fuzzer/FunctionFuzzer";
import {fuzz} from "../../index";
import {sum} from "../__mocks__/sum.mock";
import {FunctionFuzzerFactory} from "../FunctionFuzzerFactory";
describe("FunctionFuzzerFactory", () => {
const sumFuzzerFactory = fuzz(sum);
test("functionFuzzer should cre... | import {FunctionFuzzer} from "../../fuzzer/FunctionFuzzer";
import {fuzz} from "../../index";
import {sum} from "../__mocks__/sum.mock";
import {FunctionFuzzerFactory} from "../FunctionFuzzerFactory";
describe("FunctionFuzzerFactory", () => {
const sumFuzzerFactory = fuzz(sum);
test("functionFuzzer should cre... | Add snapshot testing for sum function | Add snapshot testing for sum function
| TypeScript | mit | usehotkey/fuzzing | ---
+++
@@ -14,14 +14,23 @@
expect((sumFuzzerFactory as any).func).toBe(sum);
});
- test("factory methods should creates fuzzer without error", () => {
- const methodNames: Array<keyof FunctionFuzzerFactory> = [
- "boolean", "booleanArray", "number", "numberArray", "string", "stri... |
9de7ea79edbfb770b46c8c48041a87e4fa836a9c | app/src/ui/notification/new-commits-banner.tsx | app/src/ui/notification/new-commits-banner.tsx | import * as React from 'react'
import { ButtonGroup } from '../lib/button-group'
import { Button } from '../lib/button'
import { Ref } from '../lib/ref'
import { Octicon, OcticonSymbol } from '../octicons'
interface NewCommitsBannerProps {
readonly numCommits: number
readonly ref: string
}
export class NewCommits... | import * as React from 'react'
import { ButtonGroup } from '../lib/button-group'
import { Button } from '../lib/button'
import { Ref } from '../lib/ref'
import { Octicon, OcticonSymbol } from '../octicons'
interface NewCommitsBannerProps {
readonly numCommits: number
readonly ref: string
}
export class NewCommits... | Set the correct primary button | Set the correct primary button
Co-Authored-By: Don Okuda <4c6d0b2619069006ac7c9a25901af91ff7fe6f78@gmail.com>
| TypeScript | mit | artivilla/desktop,j-f1/forked-desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,say25/desktop,artivilla/desktop,desktop/desktop,artivilla/desktop,say25/desktop,shiftkey/desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,kactus-io/kactus,say25/desktop,j-f1/forked-des... | ---
+++
@@ -29,10 +29,10 @@
<ButtonGroup>
<Button type="submit" onClick={this.noOp}>
- Merge...
+ Compare
</Button>
- <Button onClick={this.noOp}>Compare</Button>
+ <Button onClick={this.noOp}>Merge...</Button>
</ButtonGroup>
<... |
67d35ad418c818ad7556f2d3d35ceaf13356b06c | build/azure-pipelines/common/computeNodeModulesCacheKey.ts | build/azure-pipelines/common/computeNodeModulesCacheKey.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.
*---------------------------------------------------------------... | Use relevant sections from `package.json` in the cache key computation | Use relevant sections from `package.json` in the cache key computation
| TypeScript | mit | microsoft/vscode,Microsoft/vscode,microsoft/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,microsoft/vscode,microsoft/vscode,eamodio/vscode,Microsoft/vscode,microsoft/vscode,Microsoft/vscode,Microsoft/vscode,Microsoft/vscode,eamodio/vscode,microsoft/vscode,eam... | ---
+++
@@ -18,8 +18,18 @@
shasum.update(fs.readFileSync(path.join(ROOT, '.yarnrc')));
shasum.update(fs.readFileSync(path.join(ROOT, 'remote/.yarnrc')));
-// Add `yarn.lock` files
+// Add `package.json` and `yarn.lock` files
for (let dir of dirs) {
+ const packageJsonPath = path.join(ROOT, dir, 'package.json');
... |
53fc0c68b23621b302b2d29d68a1e1fa4c3c76e7 | polygerrit-ui/app/services/flags/flags_test.ts | polygerrit-ui/app/services/flags/flags_test.ts | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Fix some Code Style issue | Fix some Code Style issue
This somehow triggers in go/grev/308953 which does not even touch this
file.
:
Change-Id: If48813ef9360f6acb28b943e1484c2e77007768b
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -41,4 +41,3 @@
assert.deepEqual(flags.enabledExperiments, ['a']);
});
});
- |
abee08ec189f0ea50e16d4b82c37fdf16a799517 | piwik-tracker/piwik-tracker-tests.ts | piwik-tracker/piwik-tracker-tests.ts | /// <reference path="../node/node.d.ts" />
/// <reference path="piwik-tracker.d.ts" />
// Example code taken from https://www.npmjs.com/package/piwik-tracker
var PiwikTracker = require('piwik-tracker');
// Initialize with your site ID and Piwik URL
var piwik = new PiwikTracker(1, 'http://mywebsite.com/piwik.php');... | /// <reference path="../node/node.d.ts" />
/// <reference path="piwik-tracker.d.ts" />
// Example code taken from https://www.npmjs.com/package/piwik-tracker
var PiwikTracker = require('piwik-tracker');
// Initialize with your site ID and Piwik URL
var piwik = new PiwikTracker(1, 'http://mywebsite.com/piwik.php');... | Fix parameter type (implicity any) | piwik-tracker-test: Fix parameter type (implicity any) | TypeScript | mit | sergey-buturlakin/DefinitelyTyped,TildaLabs/DefinitelyTyped,ryan-codingintrigue/DefinitelyTyped,georgemarshall/DefinitelyTyped,lucyhe/DefinitelyTyped,forumone/DefinitelyTyped,timjk/DefinitelyTyped,manekovskiy/DefinitelyTyped,lekaha/DefinitelyTyped,robert-voica/DefinitelyTyped,Trapulo/DefinitelyTyped,Dominator008/Defini... | ---
+++
@@ -9,7 +9,7 @@
var piwik = new PiwikTracker(1, 'http://mywebsite.com/piwik.php');
// Optional: Respond to tracking errors
-piwik.on('error', function(err) {
+piwik.on('error', function(err : Error) {
console.log('error tracking request: ', err)
})
|
0cbb935ef133f176d5692ffe37c40e82b3c1aaa1 | e2e/app.e2e-spec.ts | e2e/app.e2e-spec.ts | import { KnownForWebPage } from './app.po';
describe('known-for-web App', function() {
let page: KnownForWebPage;
beforeEach(() => {
page = new KnownForWebPage();
});
it('should display website title', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Known For');
});
it('shoul... | import { KnownForWebPage } from './app.po';
describe('known-for-web App', function() {
let page: KnownForWebPage;
beforeEach(() => {
page = new KnownForWebPage();
});
it('should display website title', () => {
page.navigateTo();
expect(page.getTitleText()).toEqual('Known For');
});
it('shoul... | Handle actors with fewer than three featured films | Handle actors with fewer than three featured films
| TypeScript | isc | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | ---
+++
@@ -17,9 +17,9 @@
expect(page.getActorName()).not.toBeNull();
});
- it('should show three movies the person is known for', () => {
+ it('should show up to three movies the person is known for', () => {
page.navigateTo();
- expect(page.getMovieCount()).toEqual(3);
+ expect(page.getMovieC... |
8eea0846157df029faf46759d2bf514240f363fd | A2/quickstart/src/app/models/mocks.ts | A2/quickstart/src/app/models/mocks.ts | // mocks.ts
import { RacePart } from "./race-part.model";
export const RACE_PARTS: RacePart[] = [{
"id": 1,
"name": "Daytona Thunderdome",
"date": new Date('2512-01-04T14:00:00'),
"about": "Race through the ruins of an ancient Florida battle arena.",
"entryFee": 3200
}, {
"id": 2,
"name": "San Francisco... | // mocks.ts
import { RacePart } from "./race-part.model";
export const RACE_PARTS: RacePart[] = [{
"id": 1,
"name": "Daytona Thunderdome",
"date": new Date('2512-01-04T14:00:00'),
"about": "Race through the ruins of an ancient Florida battle arena.",
"entryFee": 3200,
"isRacing": false,
"image": "/image... | Add new fields to mock | Add new fields to mock
| TypeScript | mit | var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training,var-bin/angularjs-training | ---
+++
@@ -7,17 +7,26 @@
"name": "Daytona Thunderdome",
"date": new Date('2512-01-04T14:00:00'),
"about": "Race through the ruins of an ancient Florida battle arena.",
- "entryFee": 3200
+ "entryFee": 3200,
+ "isRacing": false,
+ "image": "/images/daytona_thunderdome.jpg",
+ "imageDescription": "Race t... |
f8fcadb47a0247427ee395d10f91db565a39efed | src/extension.ts | src/extension.ts | 'use strict';
import * as vscode from 'vscode';
import {PathAutocomplete} from './features/PathAutoCompleteProvider';
export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.languages.registerCompletionItemProvider('*', new PathAutocomplete(), '/'));
}
// this method is call... | 'use strict';
import * as vscode from 'vscode';
import {PathAutocomplete} from './features/PathAutocompleteProvider';
export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode.languages.registerCompletionItemProvider('*', new PathAutocomplete(), '/'));
}
// this method is call... | Fix import issue due to case-sensitivity | Fix import issue due to case-sensitivity
| TypeScript | mit | ionutvmi/path-autocomplete,ionutvmi/path-autocomplete | ---
+++
@@ -1,6 +1,6 @@
'use strict';
import * as vscode from 'vscode';
-import {PathAutocomplete} from './features/PathAutoCompleteProvider';
+import {PathAutocomplete} from './features/PathAutocompleteProvider';
export function activate(context: vscode.ExtensionContext) {
context.subscriptions.push(vscode... |
2346c74bb6e5554dbb28daef304cfa79f59f025d | src/Store.ts | src/Store.ts | import { Flow } from './Flow';
import { Soak, completeSoak } from './Soak';
import { Observable, Subject } from 'rxjs';
/**
* The dispatch and state that comprises a dw Store.
*/
export type Store<State, Action> = {
dispatch$: Subject<Action>;
state$: Observable<State>;
};
/**
* Links a flow, soak and init... | import { Flow } from './Flow';
import { Soak, completeSoak } from './Soak';
import { Observable, Subject } from 'rxjs';
/**
* The dispatch and state that comprises a dw Store.
*/
export type Store<State, Action> = {
/** dispatch actions into the store */
dispatch$: Subject<Action>;
/** observable of acti... | Apply initial state (concact) if provided so that even if no actions sent yet, the initial state is provided to subscribers. | Apply initial state (concact) if provided so that even if no actions sent yet, the initial state is provided to subscribers.
Also publish the end of the flow observable as some components etc. might want to work purely off the action stream (e.g. notifications)
| TypeScript | apache-2.0 | elhedran/rxjs-dew,elhedran/rxjs-dew | ---
+++
@@ -6,7 +6,11 @@
* The dispatch and state that comprises a dw Store.
*/
export type Store<State, Action> = {
+ /** dispatch actions into the store */
dispatch$: Subject<Action>;
+ /** observable of actions after flows applied */
+ flow$: Observable<Action>
+ /** observable of state after... |
18c8be74d0f57490192ebcfb63400574e01adf87 | src/moves.ts | src/moves.ts | export function getMoves(grid: boolean[]): number[] {
return grid
.map((value, index) => value == undefined ? index : undefined)
.filter(value => value != undefined);
}
| import { Grid, Move } from './definitions';
export function getMoves(grid: Grid): Move[] {
return grid
.map((value, index) => value == undefined ? index : undefined)
.filter(value => value != undefined);
}
| Make getMoves function use Grid and Move | Make getMoves function use Grid and Move
| TypeScript | mit | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | ---
+++
@@ -1,4 +1,6 @@
-export function getMoves(grid: boolean[]): number[] {
+import { Grid, Move } from './definitions';
+
+export function getMoves(grid: Grid): Move[] {
return grid
.map((value, index) => value == undefined ? index : undefined)
.filter(value => value != undefined); |
1d390997f601ca78331ca844779a3a5ea73b38e0 | packages/language-server-ruby/src/util/TreeSitterFactory.ts | packages/language-server-ruby/src/util/TreeSitterFactory.ts | import path from 'path';
import Parser from 'web-tree-sitter';
const TREE_SITTER_RUBY_WASM = path.resolve(__dirname, 'tree-sitter-ruby.wasm');
const TreeSitterFactory = {
language: null,
async initalize(): Promise<void> {
await Parser.init();
console.debug(`Loading Ruby tree-sitter syntax from ${TREE_SITTER_RU... | import path from 'path';
import fs from 'fs';
import Parser from 'web-tree-sitter';
const TREE_SITTER_RUBY_WASM = ((): string => {
let wasmPath = path.resolve(__dirname, 'tree-sitter-ruby.wasm');
if (!fs.existsSync(wasmPath)) {
wasmPath = path.resolve(__dirname, '..', 'tree-sitter-ruby.wasm');
}
return wasmPath... | Tweak resolving location of tree-sitter-ruby.wasm | Tweak resolving location of tree-sitter-ruby.wasm
| TypeScript | mit | rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby,rubyide/vscode-ruby | ---
+++
@@ -1,7 +1,15 @@
import path from 'path';
+import fs from 'fs';
import Parser from 'web-tree-sitter';
-const TREE_SITTER_RUBY_WASM = path.resolve(__dirname, 'tree-sitter-ruby.wasm');
+const TREE_SITTER_RUBY_WASM = ((): string => {
+ let wasmPath = path.resolve(__dirname, 'tree-sitter-ruby.wasm');
+ if (!f... |
696c27d0feb38072c54a231c5b960eef5c95a0bf | src/Components/Authentication/Mobile/ForgotPasswordForm.tsx | src/Components/Authentication/Mobile/ForgotPasswordForm.tsx | import {
Error,
Footer,
FormContainer as Form,
MobileContainer,
MobileHeader,
MobileInnerWrapper,
SubmitButton,
} from "Components/Authentication/commonElements"
import Input from "Components/Input"
import { Formik, FormikProps } from "formik"
import React from "react"
import { FormComponentType, InputVal... | import {
Error,
Footer,
FormContainer as Form,
MobileContainer,
MobileHeader,
MobileInnerWrapper,
SubmitButton,
} from "Components/Authentication/commonElements"
import Input from "Components/Input"
import { Formik, FormikProps } from "formik"
import React from "react"
import { FormComponentType, InputVal... | Change reset password button copy | Change reset password button copy
| TypeScript | mit | xtina-starr/reaction,artsy/reaction,artsy/reaction,artsy/reaction,artsy/reaction-force,xtina-starr/reaction,artsy/reaction-force,xtina-starr/reaction,xtina-starr/reaction | ---
+++
@@ -50,7 +50,9 @@
/>
{status &&
!status.success && <Error show>{status.error}</Error>}
- <SubmitButton disabled={isSubmitting}>Next</SubmitButton>
+ <SubmitButton disabled={isSubmitting}>
+ Send me reset instru... |
c7e884d0544daaa55cba9aabdd11316d0f5a02c8 | src/resources/interfaces.ts | src/resources/interfaces.ts | interface Parameter {
name: string;
type: string;
example_values: string[];
comment: string;
required: boolean;
}
interface Action {
name: string;
method: string;
path: string;
comment: string;
params?: Parameter[];
}
interface Resource {
name: string;
comment: string;
templates: any[];
pr... | interface Parameter {
name: string;
type: string;
example_values?: string[];
comment: string;
required?: boolean;
}
interface Action {
name: string;
method: string;
path: string;
comment: string;
params?: Parameter[];
}
interface Resource {
name: string;
comment: string;
templates: any[];
... | Make Parameter interface less strict | Make Parameter interface less strict
| TypeScript | mit | Asana/api-explorer,Asana/api-explorer | ---
+++
@@ -1,9 +1,9 @@
interface Parameter {
name: string;
type: string;
- example_values: string[];
+ example_values?: string[];
comment: string;
- required: boolean;
+ required?: boolean;
}
interface Action { |
0ee644c4ab9f17915e902cf16d68b63ee01322d4 | src/app/core/configuration/boot/config-reader.ts | src/app/core/configuration/boot/config-reader.ts | import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {MDInternal} from '../../../components/messages/md-internal';
@Injectable()
/**
* @author Daniel de Oliveira
* @author Thomas Kleinke
*/
export class ConfigReader {
constructor(private http: HttpClient) {}
p... | import {Injectable} from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {MDInternal} from '../../../components/messages/md-internal';
@Injectable()
/**
* @author Daniel de Oliveira
* @author Thomas Kleinke
*/
export class ConfigReader {
constructor(private http: HttpClient) {}
p... | Fix error handling in config reader | Fix error handling in config reader
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -16,21 +16,13 @@
return new Promise((resolve, reject) => {
- this.http.get(path).subscribe((data_: any) => {
-
- let data;
- try {
- data = data_;
- } catch(e) {
+ this.http.get(path).subscribe(
+ ... |
5e001c896a7d5f632b6cd9e9ce7447cad90f64d2 | client/Settings/components/CommandInfo.ts | client/Settings/components/CommandInfo.ts | export const CommandInfoById = {
"start-encounter": "The first combatant in the initiative order will become active"
} | export const CommandInfoById = {
"start-encounter":
"The first combatant in the initiative order will become active.",
"clear-encounter":
"Remove all combatants, including player characters, and end the encounter.",
"clean-encounter": "Remove all creatures and NPCs, and end the encounter.",
"quick-add":... | Add info for several commands | Add info for several commands
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -1,3 +1,26 @@
export const CommandInfoById = {
- "start-encounter": "The first combatant in the initiative order will become active"
-}
+ "start-encounter":
+ "The first combatant in the initiative order will become active.",
+ "clear-encounter":
+ "Remove all combatants, including player charact... |
65d411e510df73b98a5c27e035d74ec606d041da | src/boot.ts | src/boot.ts | import "angular";
import "angular-animate";
import "angular-material";
import "../node_modules/angular-aria/angular-aria.js";
//import "MainController";
import {MainController} from "./controllers/mainController.ts";
angular.module('projectTemplateApp', ['ngMaterial'])
.controller('mainController', MainControll... | import "angular";
import "angular-animate";
import "angular-material";
import "../node_modules/angular-aria/angular-aria.js";
import {MainController} from "./controllers/mainController.ts";
angular.module('projectTemplateApp', ['ngMaterial'])
.controller('mainController', MainController); | Remove old controller import statement… | Remove old controller import statement…
| TypeScript | mit | rsparrow/angular-material-typescript-webpack,rsparrow/angular-material-typescript-webpack,rsparrow/angular-material-typescript-webpack | ---
+++
@@ -1,10 +1,10 @@
import "angular";
import "angular-animate";
+
+
import "angular-material";
import "../node_modules/angular-aria/angular-aria.js";
-
-//import "MainController";
import {MainController} from "./controllers/mainController.ts";
|
7a79953f0222dc033aafac70169477305d62fb5f | test/e2e/security/security_test.ts | test/e2e/security/security_test.ts | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {reloadDevTools} from '../../shared/helper.js';
import {describe, it} from '../../shared/mocha-extensions.js';
import {closeSecurityTab, navigateTo... | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import {reloadDevTools} from '../../shared/helper.js';
import {describe, it} from '../../shared/mocha-extensions.js';
import {closeSecurityTab, navigateTo... | Enable a security panel test | Enable a security panel test
Fixed: 1183304
Change-Id: Ib9a5e423d74448428ad7aed8fa1555c449cd0272
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598791
Reviewed-by: Simon Zünd <38944668e9e2ca98ccd0275b53370f90fa55c113@chromium.org>
Commit-Queue: Alex Rudenko <d8d88e7d7e77f69e23d1d... | TypeScript | bsd-3-clause | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | ---
+++
@@ -24,8 +24,7 @@
await securityTabExists();
});
- // Test flaky on Windows
- it.skipOnPlatforms(['win32'], '[crbug.com/1183304]: can be opened from command menu after being closed', async () => {
+ it('can be opened from command menu after being closed', async () => {
await closeSecurityTab... |
dc42be5a79e9dbd3056697351bd7e76d8fef6f59 | addons/contexts/src/preview/frameworks/preact.ts | addons/contexts/src/preview/frameworks/preact.ts | import Preact from 'preact';
import { createAddonDecorator, Render } from '../../index';
import { ContextsPreviewAPI } from '../ContextsPreviewAPI';
/**
* This is the framework specific bindings for Preact.
* '@storybook/preact' expects the returning object from a decorator to be a 'Preact vNode'.
*/
export const r... | import { h, VNode } from 'preact';
import { createAddonDecorator, Render } from '../../index';
import { ContextsPreviewAPI } from '../ContextsPreviewAPI';
/**
* This is the framework specific bindings for Preact.
* '@storybook/preact' expects the returning object from a decorator to be a 'Preact vNode'.
*/
export c... | Fix 'cannot read property h of undefined' | Fix 'cannot read property h of undefined'
| TypeScript | mit | storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook | ---
+++
@@ -1,4 +1,4 @@
-import Preact from 'preact';
+import { h, VNode } from 'preact';
import { createAddonDecorator, Render } from '../../index';
import { ContextsPreviewAPI } from '../ContextsPreviewAPI';
@@ -6,9 +6,9 @@
* This is the framework specific bindings for Preact.
* '@storybook/preact' expects ... |
25c132b5193d7fbecd3317feb443a68ae5698b5d | src/main.ts | src/main.ts | import {createState, createReducer} from "./rxjs-redux";
import {counterActions, counterReducer, CounterState} from "./counter";
import {nameActions, nameReducer, NameState} from "./appName";
// our application state as a strongly typed class
interface IAppState extends CounterState, NameState /* otherState1, otherSta... | import {createState, createReducer} from "./rxjs-redux";
import {counterActions, counterReducer, CounterState} from "./counter";
import {nameActions, nameReducer, NameState} from "./appName";
// our application state as a strongly typed class
interface IAppState extends CounterState, NameState /* otherState1, otherSta... | Edit example to show default argument usage | Edit example to show default argument usage
| TypeScript | mit | Dynalon/redux-pattern-with-rx,Dynalon/redux-pattern-with-rx | ---
+++
@@ -35,8 +35,8 @@
});
// dispatch some actions
-counterActions.increment.next(1);
-counterActions.increment.next(1);
+counterActions.increment.next();
+counterActions.increment.next();
nameActions.appName.next("Foo");
counterActions.decrement.next(5);
counterActions.increment.next(8); |
86e2288e1a0288c8fd720f558693efa35ff8de7f | typescript/sorting/merge-sort.ts | typescript/sorting/merge-sort.ts | // Top-down implementation with lists
function merge<T>(left: T[], right: T[]): T[] {
const merged = [];
let firstLeft = left[0];
let firstRight = right[0];
while (left.length && right.length) {
if (firstLeft <= firstRight) {
merged.push(firstLeft);
left.shift();
firstLeft = left[0];
... | // Top-down implementation with lists
function merge<T>(left: T[], right: T[]): T[] {
const merged = [];
let firstLeft = left[0];
let firstRight = right[0];
while (left.length && right.length) {
if (firstLeft <= firstRight) {
merged.push(firstLeft);
left.shift();
firstLeft = left[0];
... | Simplify TS merge sort code | Simplify TS merge sort code
| TypeScript | mit | hAWKdv/DataStructures,hAWKdv/DataStructures | ---
+++
@@ -33,18 +33,9 @@
return arr;
}
- let left = [];
- let right = [];
const mid = arr.length / 2;
-
- for (let i = 0; i < arr.length; i++) {
- const el = arr[i];
- if (i < mid) {
- left.push(el);
- } else {
- right.push(el);
- }
- }
+ let left = arr.slice(0, mid);
+ let ... |
5c22232fd949908963229409444f6893b169604d | app/components/resources/view/operation-views.ts | app/components/resources/view/operation-views.ts | import {ViewDefinition} from 'idai-components-2/configuration';
/**
* @author Thomas Kleinke
* @author Daniel de Oliveira
*/
export class OperationViews {
constructor(
private _: any
) {
if (!_) _ = [];
}
public get() {
return this._;
}
public getLabelForName(n... | import {ViewDefinition} from 'idai-components-2/configuration';
/**
* @author Thomas Kleinke
* @author Daniel de Oliveira
*/
export class OperationViews {
constructor(
private _: any
) {
if (!_) _ = [];
}
public get() {
return this._;
}
public getLabelForName(n... | Use fp and find method | Use fp and find method
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -20,22 +20,24 @@
}
- public getLabelForName(name: any) {
+ public getLabelForName(name: string) {
- for (let view of this._) {
- if (view.name == name) return view.mainTypeLabel;
- }
- return undefined;
+ const view = this.namedView(name);
+ re... |
6d5da9d0b3a4d40ef432ce7edb4dcef432b5906a | helpers/coreInterfaces.ts | helpers/coreInterfaces.ts | /// <reference path="includes.ts"/>
/// <reference path="stringHelpers.ts"/>
namespace Core {
/**
* Typescript interface that represents the UserDetails service
*/
export interface UserDetails {
username: String
password: String
loginDetails?: Object
}
/**
* Typescript interface that repr... | /// <reference path="includes.ts"/>
/// <reference path="stringHelpers.ts"/>
namespace Core {
/**
* Typescript interface that represents the UserDetails service
*/
export interface UserDetails {
username: String
password: String
loginDetails?: Object
}
/**
* Typescript interface that repr... | Remove ConnectToServerOptions interface in favor of shorter ConnectOptions | Remove ConnectToServerOptions interface in favor of shorter ConnectOptions
| TypeScript | apache-2.0 | hawtio/hawtio-utilities,hawtio/hawtio-utilities,hawtio/hawtio-utilities | ---
+++
@@ -14,7 +14,7 @@
/**
* Typescript interface that represents the options needed to connect to another JVM
*/
- export interface ConnectToServerOptions {
+ export interface ConnectOptions {
scheme: String;
host?: String;
port?: Number;
@@ -28,23 +28,16 @@
secure: boolean;
}
... |
afbc89ba69b86563653b9a314872b2e509b4c619 | saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx | saleor/static/dashboard-next/components/DateFormatter/DateFormatter.tsx | import Tooltip from "@material-ui/core/Tooltip";
import * as moment from "moment-timezone";
import * as React from "react";
import ReactMoment from "react-moment";
import { LocaleConsumer } from "../Locale";
import { TimezoneConsumer } from "../Timezone";
import { Consumer } from "./DateContext";
interface DateFormat... | import Tooltip from "@material-ui/core/Tooltip";
import * as moment from "moment-timezone";
import * as React from "react";
import ReactMoment from "react-moment";
import { LocaleConsumer } from "../Locale";
import { TimezoneConsumer } from "../Timezone";
import { Consumer } from "./DateContext";
interface DateFormat... | Fix date formatting when timezone is missing | Fix date formatting when timezone is missing
| TypeScript | bsd-3-clause | mociepka/saleor,UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor,UITools/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,mociepka/saleor,UITools/saleor | ---
+++
@@ -14,6 +14,13 @@
const DateFormatter: React.StatelessComponent<DateFormatterProps> = ({
date
}) => {
+ const getTitle = (value: string, locale?: string, tz?: string) => {
+ let date = moment(value).locale(locale);
+ if (tz !== undefined) {
+ date = date.tz(tz);
+ }
+ return date.toLoc... |
3c01fce00cf8dc7ee2275cd4ae5c9b0cb401673c | src/app/patient-dashboard/patient-dashboard.component.spec.ts | src/app/patient-dashboard/patient-dashboard.component.spec.ts | /* tslint:disable:no-unused-variable */
import { TestBed, async } from '@angular/core/testing';
import { PatientDashboardComponent } from './patient-dashboard.component';
describe('Component: PatientDashboard', () => {
it('should create an instance', () => {
let component = new PatientDashboardComponent();
... | /* tslint:disable:no-unused-variable */
import { TestBed, async } from '@angular/core/testing';
import { Observable } from 'rxjs/Rx';
import { Router, ActivatedRoute, Params } from '@angular/router';
import { DynamicRoutesService } from '../shared/services/dynamic-routes.service';
import { PatientDashboardComponent }... | Fix patient dash board test | Fix patient dash board test
| TypeScript | mit | AMPATH/ng2-amrs,AMPATH/ng2-amrs,AMPATH/ng2-amrs,AMPATH/ng2-amrs | ---
+++
@@ -1,11 +1,30 @@
/* tslint:disable:no-unused-variable */
import { TestBed, async } from '@angular/core/testing';
+import { Observable } from 'rxjs/Rx';
+import { Router, ActivatedRoute, Params } from '@angular/router';
+
+import { DynamicRoutesService } from '../shared/services/dynamic-routes.service';
... |
b4186bb75b9a1663e69ef8efb9e5bd14ddff47c4 | src/Services/error-message.service.spec.ts | src/Services/error-message.service.spec.ts | import { TestBed, inject } from '@angular/core/testing';
import { ErrorMessageService } from './error-message.service';
describe('ErrorMessageService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [ErrorMessageService]
});
});
it('should ...', inject([ErrorMessageService... | import {inject, TestBed} from "@angular/core/testing";
import {ErrorMessageService} from "./error-message.service";
import {CUSTOM_ERROR_MESSAGES} from "../Tokens/tokens";
import {errorMessageService} from "../ng-bootstrap-form-validation.module";
describe('ErrorMessageService', () => {
const customRequiredErrorM... | Add error message service test | Add error message service test
| TypeScript | mit | third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation,third774/ng-bootstrap-form-validation | ---
+++
@@ -1,15 +1,42 @@
-import { TestBed, inject } from '@angular/core/testing';
+import {inject, TestBed} from "@angular/core/testing";
-import { ErrorMessageService } from './error-message.service';
+import {ErrorMessageService} from "./error-message.service";
+import {CUSTOM_ERROR_MESSAGES} from "../Tokens/to... |
26de55028c0c54548e0546f62c02839efdcb2da4 | src/renderers/MuiTableRenderer.tsx | src/renderers/MuiTableRenderer.tsx | import * as React from 'react'
import {
Table,
TableHeaderColumn,
TableRow,
TableHeader,
TableRowColumn,
TableBody,
CircularProgress,
} from 'material-ui'
import {
TableColumnData,
DataTableState,
} from '../components'
export function renderTableHeader(
data: TableColumnData[]
) {
return (
... | import * as React from 'react'
import {
Table,
TableHeaderColumn,
TableRow,
TableHeader,
TableRowColumn,
TableBody,
} from 'material-ui'
import {
TableColumnData,
DataTableState,
} from '../components'
export module MuiTable {
export const renderTableHeader = (
data: TableColumnData[]
) => (... | Update material-ui style table renderer | Update material-ui style table renderer
| TypeScript | mit | zhenwenc/rc-box,zhenwenc/rc-box,zhenwenc/rc-box | ---
+++
@@ -7,17 +7,18 @@
TableHeader,
TableRowColumn,
TableBody,
- CircularProgress,
} from 'material-ui'
+
import {
TableColumnData,
DataTableState,
} from '../components'
-export function renderTableHeader(
- data: TableColumnData[]
-) {
- return (
+export module MuiTable {
+
+ export const... |
8badf641563e20beb56eba24794caa70c457b24d | app/components/resources/view/state/navigation-path-segment.ts | app/components/resources/view/state/navigation-path-segment.ts | import {Document} from 'idai-components-2/core';
import {IdaiFieldDocument} from 'idai-components-2/field';
import {ViewContext} from './view-context';
import {to} from 'tsfun';
/**
* @author Thomas Kleinke
* @author Daniel de Oliveira
*/
export interface NavigationPathSegment extends ViewContext {
readonly d... | import {Document} from 'idai-components-2/core';
import {IdaiFieldDocument} from 'idai-components-2/field';
import {ViewContext} from './view-context';
import {to, differentFromBy, on} from 'tsfun';
/**
* @author Thomas Kleinke
* @author Daniel de Oliveira
*/
export interface NavigationPathSegment extends ViewCont... | Make use of differentFromBy and on | Make use of differentFromBy and on
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -1,7 +1,7 @@
import {Document} from 'idai-components-2/core';
import {IdaiFieldDocument} from 'idai-components-2/field';
import {ViewContext} from './view-context';
-import {to} from 'tsfun';
+import {to, differentFromBy, on} from 'tsfun';
/**
@@ -44,6 +44,4 @@
export const toResourceId = to('docu... |
ceae9deddc847d49983f57f01748d25f40bf85cc | src/Bibliotheca.Client.Web/src/app/components/footer/footer.component.ts | src/Bibliotheca.Client.Web/src/app/components/footer/footer.component.ts | import { Component, Input } from '@angular/core';
import { Http, Response } from '@angular/http';
import { AppConfigService } from '../../services/app-config.service'
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html'
})
export class FooterComponent {
protected siteUrl: string = n... | import { Component, Input } from '@angular/core';
import { Http, Response } from '@angular/http';
import { AppConfigService } from '../../services/app-config.service'
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html'
})
export class FooterComponent {
protected siteUrl: string = n... | Build number should have max 7 chars. | Build number should have max 7 chars.
| TypeScript | mit | BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client,BibliothecaTeam/Bibliotheca.Client | ---
+++
@@ -17,6 +17,6 @@
this.siteUrl = appConfig.footerUrl;
this.siteName = appConfig.footerName;
this.version = appConfig.version;
- this.build = appConfig.build;
+ this.build = appConfig.build.substr(0, 7);
}
} |
72f331790b3b4e3e4cff4addae8acd54281bba35 | packages/components/components/sidebar/SidebarPrimaryButton.tsx | packages/components/components/sidebar/SidebarPrimaryButton.tsx | import { forwardRef, Ref } from 'react';
import Button, { ButtonProps } from '../button/Button';
import { classnames } from '../../helpers';
const SidebarPrimaryButton = ({ children, className = '', ...rest }: ButtonProps, ref: Ref<HTMLButtonElement>) => {
return (
<Button
color="norm"
... | import { forwardRef, Ref } from 'react';
import Button, { ButtonProps } from '../button/Button';
import { classnames } from '../../helpers';
const SidebarPrimaryButton = ({ children, className = '', ...rest }: ButtonProps, ref: Ref<HTMLButtonElement>) => {
return (
<Button color="norm" size="large" classNa... | Remove bold on sidebar primary button | Remove bold on sidebar primary button
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -4,13 +4,7 @@
const SidebarPrimaryButton = ({ children, className = '', ...rest }: ButtonProps, ref: Ref<HTMLButtonElement>) => {
return (
- <Button
- color="norm"
- size="large"
- className={classnames(['text-bold mt0-25 w100', className])}
- ref=... |
913534010dde9f54426286668fda36d3dfa42958 | packages/linter/src/rules/BoilerplateIsRemoved.ts | packages/linter/src/rules/BoilerplateIsRemoved.ts | import { Context } from "../index";
import { Rule } from "../rule";
import { isTransformedAmp } from "../helper";
/**
* Check if the AMP Optimizer removed the AMP Boilerplate.
*/
export class BoilerplateIsRemoved extends Rule {
run({ $ }: Context) {
if (!isTransformedAmp($)) {
// this check is only relev... | import { Context } from "../index";
import { Rule } from "../rule";
import { isTransformedAmp } from "../helper";
/**
* Check if the AMP Optimizer removed the AMP Boilerplate.
*/
export class BoilerplateIsRemoved extends Rule {
run({ $ }: Context) {
if (!isTransformedAmp($)) {
// this check is only relev... | Change warning text for boilerplate removal check | Change warning text for boilerplate removal check
| TypeScript | apache-2.0 | ampproject/amp-toolbox,ampproject/amp-toolbox,ampproject/amp-toolbox,ampproject/amp-toolbox | ---
+++
@@ -32,7 +32,7 @@
);
}
return this.warn(
- "AMP Boilerplate not removed. Check for AMP Optimizer updates"
+ "AMP Boilerplate not removed. Please upgrade to the latest AMP Optimizer version"
);
}
meta() { |
8164db0b5562ca3608efba0c2a8135dde7d07631 | src/client/app/fassung/fassung-routing.module.ts | src/client/app/fassung/fassung-routing.module.ts | /**
* Created by Reto Baumgartner (rfbaumgartner) on 05.07.17.
*/
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FassungComponent } from './fassung.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'drucke/:konvolut/:fassung', componen... | /**
* Created by Reto Baumgartner (rfbaumgartner) on 05.07.17.
*/
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FassungComponent } from './fassung.component';
@NgModule({
imports: [
RouterModule.forChild([
{ path: 'drucke/:konvolut/:fassung', componen... | Remove route to special collection `notizbuecher-divers` | Remove route to special collection `notizbuecher-divers`
The collection `notizbuecher-divers` serves only as a ordering element in the navigation
| TypeScript | mit | nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website,nie-ine/raeber-website | ---
+++
@@ -11,7 +11,6 @@
RouterModule.forChild([
{ path: 'drucke/:konvolut/:fassung', component: FassungComponent },
{ path: 'manuskripte/:konvolut/:fassung', component: FassungComponent },
- { path: 'notizbuecher/notizbuch-divers/:konvolut/:fassung', component: FassungComponent },
{ p... |
242edc1aa2ac62016b3dd03fee53a8983b362306 | src/Cameras/Inputs/babylon.arcrotatecamera.input.mousewheel.ts | src/Cameras/Inputs/babylon.arcrotatecamera.input.mousewheel.ts | module BABYLON {
export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
camera: ArcRotateCamera;
private _wheel: (p: PointerInfo, s: EventState) => void;
private _observer: Observer<PointerInfo>;
@serialize()
public wheelPrecision = 3... | module BABYLON {
export class ArcRotateCameraMouseWheelInput implements ICameraInput<ArcRotateCamera> {
camera: ArcRotateCamera;
private _wheel: (p: PointerInfo, s: EventState) => void;
private _observer: Observer<PointerInfo>;
@serialize()
public wheelPrecision = 3... | Make sure the wheel only works when wheel is triggered. | Make sure the wheel only works when wheel is triggered.
| TypeScript | apache-2.0 | abow/Babylon.js,Temechon/Babylon.js,BabylonJS/Babylon.js,jbousquie/Babylon.js,jbousquie/Babylon.js,Hersir88/Babylon.js,NicolasBuecher/Babylon.js,BabylonJS/Babylon.js,Temechon/Babylon.js,Hersir88/Babylon.js,abow/Babylon.js,BabylonJS/Babylon.js,NicolasBuecher/Babylon.js,sebavan/Babylon.js,RaananW/Babylon.js,RaananW/Babyl... | ---
+++
@@ -10,6 +10,8 @@
public attachControl(element: HTMLElement, noPreventDefault?: boolean) {
this._wheel = (p, s) => {
+ //sanity check - this should be a PointerWheel event.
+ if (p.type !== PointerEventType.PointerWheel) return;
var event ... |
baac3ed2df638ff48f5eb0a45a72bdf5bbd506f3 | src/Styleguide/Components/__stories__/LightboxSlider.story.tsx | src/Styleguide/Components/__stories__/LightboxSlider.story.tsx | import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Slider } from "Styleguide/Components/LightboxSlider"
import { Section } from "Styleguide/Utils/Section"
storiesOf("Styleguide/Components", module).add("LightboxSlider", () => {
return (
<React.Fragment>
<Section title="Light... | import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Slider } from "Styleguide/Components/LightboxSlider"
import { Section } from "Styleguide/Utils/Section"
storiesOf("Styleguide/Components", module).add("LightboxSlider", () => {
return (
<React.Fragment>
<Section title="Light... | Remove console logs causing circle ci to fail | Remove console logs causing circle ci to fail
| TypeScript | mit | xtina-starr/reaction,artsy/reaction-force,xtina-starr/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction-force,artsy/reaction,artsy/reaction,xtina-starr/reaction | ---
+++
@@ -7,15 +7,7 @@
return (
<React.Fragment>
<Section title="Lightbox Slider">
- <Slider
- min={0}
- max={100}
- step={1}
- value={50}
- onChange={event => console.log(event.target.value)}
- onZoomInClicked={() => console.log("zoom in")... |
73e6100b9bc913b27b1739c4fac42a8ffb788402 | resources/app/auth/services/auth.service.ts | resources/app/auth/services/auth.service.ts | export class AuthService {
static NAME = 'AuthService';
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService
) {
'ngInject';
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
static factory() {
return ($http, $window) => new Au... | export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService
) {
'ngInject';
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
stati... | Add AuthService interface to define implementation | Add AuthService interface to define implementation
| TypeScript | mit | ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io | ---
+++
@@ -1,3 +1,7 @@
+export interface IAuthService {
+ isLoggedIn();
+}
+
export class AuthService {
static NAME = 'AuthService';
|
2ccd613433528b21025043f44ecad58ea8bf897b | src/dashboard-refactor/styleConstants.tsx | src/dashboard-refactor/styleConstants.tsx | import colors from './colors'
export const fonts = {
primary: {
name: 'Poppins',
colors: {
primary: colors.fonts.primary,
secondary: colors.fonts.secondary,
},
weight: {
normal: 'normal',
bold: 700,
},
},
}
const styleCons... | import colors from './colors'
export const fonts = {
primary: {
name: 'Poppins',
colors: {
primary: colors.fonts.primary,
secondary: colors.fonts.secondary,
},
weight: {
normal: 'normal',
bold: 700,
},
},
}
const styleCons... | Add sidebar width to style constants | Add sidebar width to style constants
| TypeScript | mit | WorldBrain/WebMemex,WorldBrain/WebMemex | ---
+++
@@ -21,6 +21,9 @@
boxShadow: '0px 0px 4.20px rgba(0, 0, 0, 0.14)',
borderRadius: '2.1px',
},
+ sidebar: {
+ widthPx: 173,
+ },
},
}
|
4afee35d8713455949213866e15194c4b960b60a | packages/schematics/src/scam/index.ts | packages/schematics/src/scam/index.ts | import { chain, externalSchematic, Rule } from '@angular-devkit/schematics';
import { Schema as NgComponentOptions } from '@schematics/angular/component/schema';
export interface ScamOptions extends NgComponentOptions {
separateModule: boolean;
}
export const _mergeModuleIntoComponentFile: (options: ScamOptions) ... | import { chain, externalSchematic, Rule } from '@angular-devkit/schematics';
import { Schema as NgComponentOptions } from '@schematics/angular/component/schema';
import { findModuleFromOptions } from '@schematics/angular/utility/find-module';
import { buildDefaultPath, getProject } from '@schematics/angular/utility/pro... | Merge module and component as default behavior. | @wishtack/schematics:scam: Merge module and component as default behavior.
| TypeScript | mit | wishtack/wishtack-steroids,wishtack/wishtack-steroids,wishtack/wishtack-steroids,wishtack/ng-steroids,wishtack/ng-steroids | ---
+++
@@ -1,12 +1,23 @@
import { chain, externalSchematic, Rule } from '@angular-devkit/schematics';
import { Schema as NgComponentOptions } from '@schematics/angular/component/schema';
+import { findModuleFromOptions } from '@schematics/angular/utility/find-module';
+import { buildDefaultPath, getProject } from ... |
304e3ee9c0e270364291b36eef859541f3291b4b | typescript-marionette-v2/src/TodosView.ts | typescript-marionette-v2/src/TodosView.ts | // TODO: Why does the compiler not complain when Marionette is missing?
import * as Marionette from "backbone.marionette"
import TodoCollection from "./TodoCollection"
import TodoModel from "./TodoModel"
import TodoView from "./TodoView"
// Add childViewContainer?:string; to CollectionViewOptions in marionette/index.d... | // TODO: Why does the compiler not complain when Marionette is missing?
import * as Marionette from "backbone.marionette"
import TodoCollection from "./TodoCollection"
import TodoModel from "./TodoModel"
import TodoView from "./TodoView"
// Add this to marionette/index.d.ts.
// interface CompositeViewOptions<TModel ex... | Introduce setDefaultOptions to extend the options | Introduce setDefaultOptions to extend the options
| TypeScript | unlicense | janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations,janaagaard75/framework-investigations | ---
+++
@@ -4,19 +4,20 @@
import TodoModel from "./TodoModel"
import TodoView from "./TodoView"
-// Add childViewContainer?:string; to CollectionViewOptions in marionette/index.d.ts.
+// Add this to marionette/index.d.ts.
+// interface CompositeViewOptions<TModel extends Backbone.Model> extends CollectionViewOpti... |
6bfdcd6405c3e12dc8c74781fd7c6ebce3cb3d09 | frontend/src/pages/home/index.tsx | frontend/src/pages/home/index.tsx | import * as React from 'react';
import { Navbar } from 'components/navbar';
export class HomePage extends React.Component {
render() {
return (
<div className="App">
<Navbar />
<p className="App-intro">
To get started, edit <code>src/App.tsx</code> and save to reload.
</p>... | import * as React from 'react';
import { Navbar } from 'components/navbar';
import { Button } from 'components/button';
import { Grid, Column } from 'components/grid';
import { Card } from 'components/card';
export const HomePage = () => (
<div>
<Navbar />
<div className="hero">
<h1>PyCon 10</h1>
... | Add some dummy content to the home page | Add some dummy content to the home page
| TypeScript | mit | patrick91/pycon,patrick91/pycon | ---
+++
@@ -1,15 +1,72 @@
import * as React from 'react';
import { Navbar } from 'components/navbar';
+import { Button } from 'components/button';
+import { Grid, Column } from 'components/grid';
+import { Card } from 'components/card';
-export class HomePage extends React.Component {
- render() {
- return (
... |
bb3851cf1398b63232c7f230bad8563eb2e654b1 | app/src/ui/lib/theme-change-monitor.ts | app/src/ui/lib/theme-change-monitor.ts | import { remote } from 'electron'
import { ApplicationTheme } from './application-theme'
import { IDisposable, Disposable, Emitter } from 'event-kit'
import { supportsDarkMode, isDarkModeEnabled } from './dark-theme'
class ThemeChangeMonitor implements IDisposable {
private readonly emitter = new Emitter()
public... | import { remote } from 'electron'
import { ApplicationTheme } from './application-theme'
import { IDisposable, Disposable, Emitter } from 'event-kit'
import { supportsDarkMode, isDarkModeEnabled } from './dark-theme'
class ThemeChangeMonitor implements IDisposable {
private readonly emitter = new Emitter()
public... | Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+ | Fix nativeTheme errors in tests on Windows 10 1809+ and Server 2019+
| TypeScript | mit | artivilla/desktop,say25/desktop,desktop/desktop,artivilla/desktop,say25/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,j-f1/forked-desktop,artivilla/desktop,j-f1/forked-desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,desktop/desktop,say25/desktop,shiftkey/deskto... | ---
+++
@@ -11,11 +11,13 @@
}
public dispose() {
- remote.nativeTheme.removeAllListeners()
+ if (remote.nativeTheme) {
+ remote.nativeTheme.removeAllListeners()
+ }
}
private subscribe = () => {
- if (!supportsDarkMode()) {
+ if (!supportsDarkMode() || !remote.nativeTheme) {
... |
d743c75a8f4378cfaf75d4de172bf9bb2f90f2a5 | ui/src/app/shared/service/logger.service.ts | ui/src/app/shared/service/logger.service.ts | import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
/**
* A service for global logs.
*
* @author Damien Vitrac
*/
@Injectable({
providedIn: 'root'
})
export class LoggerService {
constructor() {
}
static log(value: any, ...rest: any[]) {
if (!e... | import { Injectable, isDevMode } from '@angular/core';
/**
* A service for global logs.
*
* @author Damien Vitrac
*/
@Injectable({
providedIn: 'root'
})
export class LoggerService {
constructor() {
}
static log(value: any, ...rest: any[]) {
if (isDevMode()) {
console.log(value, ...rest);
}
... | Use isDevMode() instead of environment | Use isDevMode() instead of environment
| TypeScript | apache-2.0 | BoykoAlex/spring-cloud-dataflow-ui,BoykoAlex/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,spring-cloud/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,cppwfs/spring-cloud-dataflow-ui,BoykoAlex/spring-cloud-dataflow-ui,sprin... | ---
+++
@@ -1,5 +1,4 @@
-import { Injectable } from '@angular/core';
-import { environment } from '../../../environments/environment';
+import { Injectable, isDevMode } from '@angular/core';
/**
* A service for global logs.
@@ -15,7 +14,7 @@
}
static log(value: any, ...rest: any[]) {
- if (!environmen... |
3c662b1ed2a788a9b0ac7cc6cbd80e77d93df331 | client/app/logout/logout.component.spec.ts | client/app/logout/logout.component.spec.ts | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LogoutComponent } from './logout.component';
import { AuthService } from '../services/auth.service';
describe('LogoutComponent', () => {
let component: LogoutComponent;
let fixture: ComponentFixture<LogoutComponent>;
let authServ... | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { LogoutComponent } from './logout.component';
import { AuthService } from '../services/auth.service';
class AuthServiceMock {
loggedIn = true;
logout() {
this.loggedIn = false;
}
}
describe('Component: Logout', () => {
let ... | Refactor logout component unit test | Refactor logout component unit test
| TypeScript | mit | DavideViolante/Angular2-Express-Mongoose,DavideViolante/Angular-Full-Stack,DavideViolante/Angular-Full-Stack,DavideViolante/Angular-Full-Stack,DavideViolante/Angular-Full-Stack,DavideViolante/Angular2-Express-Mongoose,DavideViolante/Angular2-Express-Mongoose | ---
+++
@@ -3,25 +3,22 @@
import { LogoutComponent } from './logout.component';
import { AuthService } from '../services/auth.service';
-describe('LogoutComponent', () => {
+class AuthServiceMock {
+ loggedIn = true;
+ logout() {
+ this.loggedIn = false;
+ }
+}
+
+describe('Component: Logout', () => {
le... |
80d68f31590ec3c70707373a38c5f2c8be0f5621 | src/Properties/IRunningBlockContent.ts | src/Properties/IRunningBlockContent.ts | // eslint-disable-next-line @typescript-eslint/no-unused-vars
import { RunningBlock } from "../System/Documents/RunningBlock";
/**
* Provides content for the different sections of a {@link RunningBlock `RunningBlock`}.
*/
export interface IRunningBlockContent
{
/**
* The content of the left part.
*/
... | // eslint-disable-next-line @typescript-eslint/no-unused-vars
import { RunningBlock } from "../System/Documents/RunningBlock";
/**
* Provides content for the different sections of a {@link RunningBlock `RunningBlock`}.
*/
export interface IRunningBlockContent
{
/**
* The content of the left part.
*/
... | Make properties of the `IRunninngBLockContent` optional | Make properties of the `IRunninngBLockContent` optional
| TypeScript | mit | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | ---
+++
@@ -9,15 +9,15 @@
/**
* The content of the left part.
*/
- Left: string;
+ Left?: string;
/**
* The content of the center part.
*/
- Center: string;
+ Center?: string;
/**
* The content of the right part.
*/
- Right: string;
+ Right?: st... |
649b45f21f1aa0415e939867e87adf43d8786b50 | src/ITranslationEvents.ts | src/ITranslationEvents.ts | import { BehaviorSubject, Subject } from 'rxjs';
export type ResourceEvent = {lng, ns};
export type MissingKeyEvent = {lngs, namespace, key, res};
export interface ITranslationEvents {
initialized: BehaviorSubject<any>;
loaded: BehaviorSubject<boolean>;
failedLoading: Subject<any>;
missingKey: Subject... | import { BehaviorSubject, Subject } from 'rxjs';
export type ResourceEvent = { lng: any, ns: any };
export type MissingKeyEvent = { lngs: any, namespace: any, key: any, res: any };
export interface ITranslationEvents {
initialized: BehaviorSubject<any>;
loaded: BehaviorSubject<boolean>;
failedLoading: Sub... | Update types of events to support noImplicitAny compiler option | Update types of events to support noImplicitAny compiler option
| TypeScript | mit | Romanchuk/angular-i18next,Romanchuk/angular-i18next,Romanchuk/angular-i18next,Romanchuk/angular-i18next | ---
+++
@@ -1,7 +1,7 @@
import { BehaviorSubject, Subject } from 'rxjs';
-export type ResourceEvent = {lng, ns};
-export type MissingKeyEvent = {lngs, namespace, key, res};
+export type ResourceEvent = { lng: any, ns: any };
+export type MissingKeyEvent = { lngs: any, namespace: any, key: any, res: any };
expor... |
c58ff87194f86351cbea32dd2da0234255233723 | client/app/heroes/services/hero.service.ts | client/app/heroes/services/hero.service.ts | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';
import { environment } from '../../../environments/environment';
import { Hero, HeroUniverse, HeroRole } from '../models'... | import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/toPromise';
import { environment } from '../../../environments/environment';
import { Hero, HeroUniverse, HeroRole } from '../models'... | Update how the query string is generated | Update how the query string is generated
| TypeScript | mit | fvilers/angular2-training,fvilers/angular2-training,fvilers/angular2-training | ---
+++
@@ -15,8 +15,9 @@
}
searchHeroes(universe: HeroUniverse, role: HeroRole, terms: string): Observable<Hero[]> {
+ const query = this.querystring({ universe, role, terms });
return this.http
- .get(`${this.url}?universe=${universe}&role=${role}&terms=${encodeURI(terms || '')}`)
+ .get(`... |
737f1613edec96a38c7d6e084c43cea779c2303a | types/react-pointable/index.d.ts | types/react-pointable/index.d.ts | // Type definitions for react-pointable 1.1
// Project: https://github.com/MilllerTime/react-pointable
// Definitions by: Stefan Fochler <https://github.com/istefo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import * as React from 'react';
export type TouchAction = '... | // Type definitions for react-pointable 1.1
// Project: https://github.com/MilllerTime/react-pointable
// Definitions by: Stefan Fochler <https://github.com/istefo>
// Dibyo Majumdar <https://github.com/mdibyo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3... | Allow Pointable element to be an SVG element | Allow Pointable element to be an SVG element
| TypeScript | mit | mcliment/DefinitelyTyped,markogresak/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,rolandzwaga/DefinitelyTyped,AgentME/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,AgentME/DefinitelyTyped,arusakov/DefinitelyTyped,arusakov/DefinitelyTyped,benliddicott/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,AgentME/DefinitelyTyped,acic... | ---
+++
@@ -1,6 +1,7 @@
// Type definitions for react-pointable 1.1
// Project: https://github.com/MilllerTime/react-pointable
// Definitions by: Stefan Fochler <https://github.com/istefo>
+// Dibyo Majumdar <https://github.com/mdibyo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyT... |
4f5934e507956b80c82fdd7e82375b075f78ab0d | addons/docs/src/frameworks/vue/extractArgTypes.ts | addons/docs/src/frameworks/vue/extractArgTypes.ts | import { ArgTypes } from '@storybook/api';
import { ArgTypesExtractor, hasDocgen, extractComponentProps } from '../../lib/docgen';
import { convert } from '../../lib/sbtypes';
import { trimQuotes } from '../../lib/sbtypes/utils';
const SECTIONS = ['props', 'events', 'slots'];
const trim = (val: any) => (val && typeof... | import { ArgTypes } from '@storybook/api';
import { ArgTypesExtractor, hasDocgen, extractComponentProps } from '../../lib/docgen';
import { convert } from '../../lib/sbtypes';
import { trimQuotes } from '../../lib/sbtypes/utils';
const SECTIONS = ['props', 'events', 'slots'];
const trim = (val: any) => (val && typeof... | Fix default values for vue argTypes | Addon-docs: Fix default values for vue argTypes
| TypeScript | mit | storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | ---
+++
@@ -15,13 +15,20 @@
SECTIONS.forEach((section) => {
const props = extractComponentProps(component, section);
props.forEach(({ propDef, docgenInfo, jsDocTags }) => {
- const { name, type, description, defaultValue, required } = propDef;
+ const { name, type, description, defaultValue: de... |
ca4022f1fe20d15ca71b1a9b4e8db1701ac53952 | ui/src/main.ts | ui/src/main.ts | import {enableProdMode} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {Thread} from 'compiled_proto/src/proto/tagpost_pb';
import {TagpostServiceClient} from 'compiled_proto/src/proto/Tagpost_rpcServiceClientPb';
import {FetchThreadsByTagRequest} from 'compiled_... | import {enableProdMode} from '@angular/core';
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
import {Thread} from 'compiled_proto/src/proto/tagpost_pb';
import {TagpostServiceClient} from 'compiled_proto/src/proto/Tagpost_rpcServiceClientPb';
import {FetchThreadsByTagRequest} from 'compiled_... | Use the same host for static content and gRPC in the UI | Use the same host for static content and gRPC in the UI
| TypeScript | apache-2.0 | googleinterns/tagpost,googleinterns/tagpost,googleinterns/tagpost,googleinterns/tagpost,googleinterns/tagpost | ---
+++
@@ -18,9 +18,17 @@
}
platformBrowserDynamic().bootstrapModule(AppModule)
- .catch(err => console.error(err));
+.catch(err => console.error(err));
-const tagpostService = new TagpostServiceClient('http://localhost:46764');
+function createGrpcClient(): TagpostServiceClient {
+ let url = new URL('/', wi... |
3b28ee3da4279213820dac7d481dcf886a564eba | src/renderer/components/toolbar/toolbar.tsx | src/renderer/components/toolbar/toolbar.tsx | import { ipcRenderer } from 'electron';
import React, { MouseEventHandler } from 'react';
import './toolbar.css';
interface ToolbarProps {
onUrlEnter: (url: string) => void;
requestUpdate: (url: string) => void;
}
export default class ToolbarComponent extends React.Component<ToolbarProps, any> {
private urlIn... | import { ipcRenderer } from 'electron';
import React from 'react';
import './toolbar.css';
interface ToolbarProps {
onUrlEnter: (url: string) => void;
requestUpdate: (url: string) => void;
}
export default class ToolbarComponent extends React.Component<ToolbarProps, any> {
private urlInput: HTMLInputElement;
... | Stop applying types to component event handlers | Stop applying types to component event handlers
| TypeScript | mit | rikuba/conmai,rikuba/conmai,rikuba/conmai | ---
+++
@@ -1,6 +1,6 @@
import { ipcRenderer } from 'electron';
-import React, { MouseEventHandler } from 'react';
+import React from 'react';
import './toolbar.css';
@@ -12,12 +12,12 @@
export default class ToolbarComponent extends React.Component<ToolbarProps, any> {
private urlInput: HTMLInputElement;
... |
f9e395b27ef4b3d6cd957dd7e67bc2796152564b | app/CakeCounter.tsx | app/CakeCounter.tsx | import * as React from "react";
import { CakeProps } from "./Cake.tsx";
import { CakeListProps } from "./CakeList.tsx";
interface CakeCounterState {
daysSinceLastCake: number;
}
class CakeCounter extends React.Component<CakeListProps, CakeCounterState> {
constructor(props: CakeListProps) {
super(props... | import * as React from "react";
import { CakeProps } from "./Cake.tsx";
import { CakeListProps } from "./CakeList.tsx";
interface CakeCounterState {
daysSinceLastCake: number;
}
class CakeCounter extends React.Component<CakeListProps, CakeCounterState> {
constructor(props: CakeListProps) {
super(props... | Refresh cake counter when a cake is added | Refresh cake counter when a cake is added
| TypeScript | mit | mieky/we-love-cake,mieky/we-love-cake | ---
+++
@@ -10,8 +10,13 @@
constructor(props: CakeListProps) {
super(props);
- this.state = {
- daysSinceLastCake: this.calculateDaysSinceLastCake(this.props.cakes)
+ this.calculateNewState = this.calculateNewState.bind(this);
+ this.state = this.calculateNewState(this.... |
8e024f9731cd1510b47411985b855ff5529e2482 | ngapp/src/app/projects/projects-routing.module.ts | ngapp/src/app/projects/projects-routing.module.ts | import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ProjectsComponent } from './projects.component';
import { ProjectComponent } from './project/project.component';
import { AuthGuard } from './../auth.guard';
const projectsRoutes = [
{ path: 'projects', component: Pr... | import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { ProjectsComponent } from './projects.component';
import { ProjectComponent } from './project/project.component';
import { AuthGuard } from './../auth.guard';
const projectsRoutes = [
{ path: 'projects', component: Pr... | Add auth guard to projects/:id route | Add auth guard to projects/:id route
| TypeScript | mit | todes1/parrot,anthonynsimon/parrot,todes1/parrot,anthonynsimon/parrot,todes1/parrot,anthonynsimon/parrot,todes1/parrot,todes1/parrot,anthonynsimon/parrot,anthonynsimon/parrot,todes1/parrot,anthonynsimon/parrot | ---
+++
@@ -6,7 +6,7 @@
const projectsRoutes = [
{ path: 'projects', component: ProjectsComponent, canActivate: [AuthGuard] },
- { path: 'projects/:id', component: ProjectComponent }
+ { path: 'projects/:id', component: ProjectComponent, canActivate: [AuthGuard] }
]
@NgModule({ |
faab1dc747ac139e7c6ac4160395a073276f9958 | src/nishe_test.ts | src/nishe_test.ts | ///<reference path='../node_modules/immutable/dist/immutable.d.ts'/>
///<reference path="../typings/jasmine/jasmine.d.ts" />
import nishe = require('nishe');
import Immutable = require('immutable');
describe('Partition', () => {
describe('domain', () => {
it('matches constructor', () => {
var p = new nish... | ///<reference path='../node_modules/immutable/dist/immutable.d.ts'/>
///<reference path='../typings/jasmine/jasmine.d.ts'/>
import nishe = require('nishe');
import Immutable = require('immutable');
describe('Partition', () => {
describe('domain', () => {
it('matches constructor', () => {
let p = new nishe... | Use let instead of var in the test | Use let instead of var in the test
| TypeScript | mit | b0ri5/nishe,b0ri5/nishe | ---
+++
@@ -1,5 +1,5 @@
///<reference path='../node_modules/immutable/dist/immutable.d.ts'/>
-///<reference path="../typings/jasmine/jasmine.d.ts" />
+///<reference path='../typings/jasmine/jasmine.d.ts'/>
import nishe = require('nishe');
import Immutable = require('immutable');
@@ -7,7 +7,7 @@
describe('Partit... |
7729f0c6821ca0d59b44da9aa70a7efc230da7c2 | plugins/kubernetes-api/ts/kubernetesApiGlobals.ts | plugins/kubernetes-api/ts/kubernetesApiGlobals.ts | /// <reference path="kubernetesApiInterfaces.ts"/>
declare var smokesignals;
module KubernetesAPI {
export var pluginName = 'hawtio-k8s-api';
export var pluginPath = 'plugins/kubernetes-api/';
export var templatePath = pluginPath + 'html/';
export var log:Logging.Logger = Logger.get(pluginName);
export va... | /// <reference path="kubernetesApiInterfaces.ts"/>
declare var smokesignals;
module KubernetesAPI {
export var pluginName = 'KubernetesAPI';
export var pluginPath = 'plugins/kubernetes-api/';
export var templatePath = pluginPath + 'html/';
export var log:Logging.Logger = Logger.get('hawtio-k8s-api');
expo... | Revert pluginName to KubernetesAPI as it is used downstream | Revert pluginName to KubernetesAPI as it is used downstream
| TypeScript | apache-2.0 | hawtio/hawtio-kubernetes-api,hawtio/hawtio-kubernetes-api,hawtio/hawtio-kubernetes-api | ---
+++
@@ -4,10 +4,10 @@
module KubernetesAPI {
- export var pluginName = 'hawtio-k8s-api';
+ export var pluginName = 'KubernetesAPI';
export var pluginPath = 'plugins/kubernetes-api/';
export var templatePath = pluginPath + 'html/';
- export var log:Logging.Logger = Logger.get(pluginName);
+ export v... |
44213dde8270a22aa87ba3b7ef835eb199e397a9 | src/_common/meta/seo-meta-container.ts | src/_common/meta/seo-meta-container.ts | import { MetaContainer } from './meta-container';
type RobotsTag = 'noindex' | 'nofollow';
type RobotsTags = Partial<{ [field in RobotsTag]: boolean }>;
export class SeoMetaContainer extends MetaContainer {
private robotsTags: RobotsTags = {};
deindex() {
this.robotsTags.noindex = true;
this.robotsTags.nofollo... | import { MetaContainer } from './meta-container';
type RobotsTag = 'noindex' | 'nofollow';
type RobotsTags = Partial<{ [field in RobotsTag]: boolean }>;
export class SeoMetaContainer extends MetaContainer {
private robotsTags: RobotsTags = {};
deindex() {
this.robotsTags.noindex = true;
this.robotsTags.nofollo... | Fix deindexing not actually deindexing, ffs | Fix deindexing not actually deindexing, ffs
| TypeScript | mit | gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt | ---
+++
@@ -13,7 +13,7 @@
}
private _updateRobotsTag() {
- const tags = Object.keys(this.robotsTags).join(' ');
+ const tags = Object.keys(this.robotsTags).join(',');
if (tags) {
this.set('robots', tags);
} |
45986caffe0564cef28a5b5ccd89a9a57eadbd78 | src/api.ts | src/api.ts | /**
* defines the public API of Chevrotain.
* changes here may require major version change. (semVer)
*/
declare var CHEV_TEST_MODE
declare var global
var testMode = (typeof global === "object" && global.CHEV_TEST_MODE) ||
(typeof window === "object" && (<any>window).CHEV_TEST_MODE)
var API:any = {}
/* istanb... | /**
* defines the public API of Chevrotain.
* changes here may require major version change. (semVer)
*/
declare var CHEV_TEST_MODE
declare var global
var testMode = (typeof global === "object" && global.CHEV_TEST_MODE) ||
(typeof window === "object" && (<any>window).CHEV_TEST_MODE)
var API:any = {}
/* istanb... | Add gast.TOP_LEVEL to the API | Add gast.TOP_LEVEL to the API
| TypeScript | apache-2.0 | SAP/chevrotain,SAP/chevrotain,SAP/chevrotain,SAP/chevrotain | ---
+++
@@ -30,6 +30,7 @@
API.gast.OR = chevrotain.gast.OR
API.gast.ProdRef = chevrotain.gast.ProdRef
API.gast.Terminal = chevrotain.gast.Terminal
+ API.gast.TOP_LEVEL = chevrotain.gast.TOP_LEVEL
}
else {
console.log("running in TEST_MODE") |
dbd8f2d1c433e306f17346214637f4f4a5116216 | client/app/app-routing.module.ts | client/app/app-routing.module.ts | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { NotFoundComponent } from './not-found.component';
const routes: Routes = [
{ path: '', redirectTo: '/tables', pathMatch: 'full' },
{ path: '**', component: NotFoundComponent }
];
@NgModule({
imports... | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { environment } from '../environments/environment';
import { NotFoundComponent } from './not-found.component';
const routes: Routes = [
{ path: '', redirectTo: '/tables', pathMatch: 'full' },
{ path: '**', ... | Use hash routing in preview mode | Use hash routing in preview mode
| TypeScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium | ---
+++
@@ -1,6 +1,6 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
-
+import { environment } from '../environments/environment';
import { NotFoundComponent } from './not-found.component';
const routes: Routes = [
@@ -10,7 +10,7 @@
@NgModule({
import... |
5adfda2e3598f29bf64e50a907301f339d11e367 | src/renderer/app/components/HistoryItem/index.tsx | src/renderer/app/components/HistoryItem/index.tsx | import * as React from 'react';
import { observer } from 'mobx-react';
import store from '../../store';
import { HistoryItem } from '../../models';
import { formatTime } from '../../utils';
import { Favicon, Item, Remove, Title, Time, Site } from './style';
const onClick = (data: HistoryItem) => (e: React.MouseEvent)... | import * as React from 'react';
import { observer } from 'mobx-react';
import store from '../../store';
import { HistoryItem } from '../../models';
import { formatTime } from '../../utils';
import { Favicon, Item, Remove, Title, Time, Site } from './style';
const onClick = (item: HistoryItem) => (e: React.MouseEvent)... | Add basic deletion in history | Add basic deletion in history
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -6,10 +6,14 @@
import { formatTime } from '../../utils';
import { Favicon, Item, Remove, Title, Time, Site } from './style';
-const onClick = (data: HistoryItem) => (e: React.MouseEvent) => {
+const onClick = (item: HistoryItem) => (e: React.MouseEvent) => {
if (e.ctrlKey) {
- data.selected = !da... |
2a727b9e4028073adc7549e36ff49a95933a14c3 | app/src/ui/discard-changes/index.tsx | app/src/ui/discard-changes/index.tsx | import * as React from 'react'
import { Repository } from '../../models/repository'
import { Dispatcher } from '../../lib/dispatcher'
import { WorkingDirectoryFileChange } from '../../models/status'
interface IDiscardChangesProps {
readonly repository: Repository
readonly dispatcher: Dispatcher
readonly files: ... | import * as React from 'react'
import { Repository } from '../../models/repository'
import { Dispatcher } from '../../lib/dispatcher'
import { WorkingDirectoryFileChange } from '../../models/status'
import { Form } from '../lib/form'
import { Button } from '../lib/button'
interface IDiscardChangesProps {
readonly r... | Use a Form for Discard Changes | Use a Form for Discard Changes
| TypeScript | mit | j-f1/forked-desktop,desktop/desktop,gengjiawen/desktop,gengjiawen/desktop,hjobrien/desktop,desktop/desktop,say25/desktop,kactus-io/kactus,BugTesterTest/desktops,artivilla/desktop,BugTesterTest/desktops,artivilla/desktop,gengjiawen/desktop,j-f1/forked-desktop,hjobrien/desktop,artivilla/desktop,say25/desktop,desktop/desk... | ---
+++
@@ -3,6 +3,8 @@
import { Repository } from '../../models/repository'
import { Dispatcher } from '../../lib/dispatcher'
import { WorkingDirectoryFileChange } from '../../models/status'
+import { Form } from '../lib/form'
+import { Button } from '../lib/button'
interface IDiscardChangesProps {
readonly... |
41fea7fd5eefe0c4b7f13fb6ff7de0fafc68f68e | app/javascript/retrospring/features/lists/destroy.ts | app/javascript/retrospring/features/lists/destroy.ts | import Rails from '@rails/ujs';
import swal from 'sweetalert';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
export function destroyListHandler(event: Event): void {
event.preventDefault();
const button = event.target as HTMLButtonElement;
... | import { post } from '@rails/request.js';
import swal from 'sweetalert';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
export function destroyListHandler(event: Event): void {
event.preventDefault();
const button = event.target as HTMLButton... | Refactor list removal to use request.js | Refactor list removal to use request.js
| TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -1,4 +1,4 @@
-import Rails from '@rails/ujs';
+import { post } from '@rails/request.js';
import swal from 'sweetalert';
import { showNotification, showErrorNotification } from 'utilities/notifications';
import I18n from 'retrospring/i18n';
@@ -18,13 +18,15 @@
cancelButtonText: I18n.translate('voc.c... |
6ceaf2c238bceecb3453c5f6e207f6bf53617658 | app/resources/resource-edit-can-deactivate-guard.ts | app/resources/resource-edit-can-deactivate-guard.ts | import { Injectable } from '@angular/core';
import { CanDeactivate,
ActivatedRouteSnapshot,
RouterStateSnapshot } from '@angular/router';
import {DocumentEditChangeMonitor} from "idai-components-2/documents";
import { ResourceEditNavigationComponent } from './resource-edit-navigation.component';
impo... | import { Injectable } from '@angular/core';
import { CanDeactivate,
ActivatedRouteSnapshot,
RouterStateSnapshot } from '@angular/router';
import {DocumentEditChangeMonitor} from "idai-components-2/documents";
import { ResourceEditNavigationComponent } from './resource-edit-navigation.component';
impo... | Fix bug which caused a console error got thrown in tests. | Fix bug which caused a console error got thrown in tests.
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -25,7 +25,7 @@
return this.resolveOrShowModal(component,function() {
if (!this.documentEditChangeMonitor.isChanged()) {
if (component.mode=='new') {
- component.discard();
+ component.discard(true);
}
... |
c92014e32f6d1b8c3ec3840ba15e063353231851 | app/js/components/delete_member.ts | app/js/components/delete_member.ts | import * as $ from 'jquery';
import addFlashMessage from './addFlashMessage';
$(() => {
const flashUl = document.querySelector('.teams__flashMessages') as HTMLUListElement;
const deleteLinks = document.querySelectorAll('.teams__deleteMemberLink');
if (!!flashUl && !!deleteLinks) {
document.addEventListener(... | import * as $ from 'jquery';
import addFlashMessage from './addFlashMessage';
$(() => {
const flashUl = document.querySelector('.teams__flashMessages') as HTMLUListElement;
const deleteLinks = document.querySelectorAll('.teams__deleteMemberLink');
if (!!flashUl && !!deleteLinks) {
document.addEventListener(... | Fix visual deletion of a wrong entry | Fix visual deletion of a wrong entry
Previously when deleting a team member it would remove the first entry in the list, now it deletes the correct entry
| TypeScript | apache-2.0 | SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard,SURFnet/sp-dashboard | ---
+++
@@ -11,7 +11,7 @@
if (!target.matches('.teams__deleteMemberLink')) return;
event.preventDefault();
- const td = document.querySelector('.teams__actions') as HTMLTableDataCellElement;
+ const td = target.closest('td') as HTMLTableDataCellElement;
td.classList.add('loading');
... |
34d48853c1a8fe845d9cfac5cd137207325ddea3 | src/app/components/inline-assessment/comment-assessment.component.ts | src/app/components/inline-assessment/comment-assessment.component.ts | import {Component, Input} from "@angular/core";
@Component({
selector: 'comment-assessment',
template: `
<div class="panel" [hidden]="!hasVoted">
<div class="panel-body">
<h4>¿Porqué está {{tipo}}</h4>
<span class="hideOverflow">{{texto}}</span>
<textarea p... | import {Component, Input} from "@angular/core";
@Component({
selector: 'comment-assessment',
template: `
<div class="panel" [hidden]="!hasVoted">
<div class="panel-body">
<h4>¿Porqué está {{tipo}}</h4>
<span class="hideOverflow">{{texto}}</span>
<textarea p... | Improve some styles on inline assessment | Improve some styles on inline assessment
| TypeScript | agpl-3.0 | llopv/jetpad-ic,llopv/jetpad-ic,llopv/jetpad-ic | ---
+++
@@ -17,7 +17,7 @@
overflow:hidden;
white-space:nowrap;
text-overflow:ellipsis;
- max-width: 200px;
+ max-width: 240px;
display:block;
}
`] |
e0d9764f81562e94eb66e4dff81fa29cab1379ad | src/browser/note/note-collection/note-item/note-item-context-menu.ts | src/browser/note/note-collection/note-item/note-item-context-menu.ts | import { Injectable } from '@angular/core';
import { MenuItemConstructorOptions } from 'electron';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { commonMenuLabels, NativeMenu } from '../../../ui/menu';
export type NoteItemContextMenuCommand = 'revealInFinder';
@Injectable()
export... | import { Injectable } from '@angular/core';
import { MenuItemConstructorOptions } from 'electron';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { commonMenuLabels, NativeMenu } from '../../../ui/menu';
export type NoteItemContextMenuCommand = 'revealInFinder' | 'deleteNote';
@Inje... | Add 'deleteNote' command on note item context menu | Add 'deleteNote' command on note item context menu
| TypeScript | mit | seokju-na/geeks-diary,seokju-na/geeks-diary,seokju-na/geeks-diary | ---
+++
@@ -5,7 +5,7 @@
import { commonMenuLabels, NativeMenu } from '../../../ui/menu';
-export type NoteItemContextMenuCommand = 'revealInFinder';
+export type NoteItemContextMenuCommand = 'revealInFinder' | 'deleteNote';
@Injectable()
@@ -25,6 +25,10 @@
id: 'revealInFinder',
... |
c74d17b8615d0f30bfd2784fdd5eac630dc16a62 | src/Carousel.webmodeler.ts | src/Carousel.webmodeler.ts | import { Component, createElement } from "react";
import { Carousel, Image } from "./components/Carousel";
import CarouselContainer, { CarouselContainerProps } from "./components/CarouselContainer";
// tslint:disable class-name
export class preview extends Component<CarouselContainerProps, {}> {
render() {
... | import { Component, createElement } from "react";
import { Carousel, Image } from "./components/Carousel";
import CarouselContainer, { CarouselContainerProps } from "./components/CarouselContainer";
type VisibilityMap = {
[P in keyof CarouselContainerProps]: boolean;
};
// tslint:disable class-name
export class ... | Add web modeler conditional visibility | Add web modeler conditional visibility
| TypeScript | apache-2.0 | mendixlabs/carousel,FlockOfBirds/carousel,mendixlabs/carousel,FlockOfBirds/carousel | ---
+++
@@ -2,6 +2,10 @@
import { Carousel, Image } from "./components/Carousel";
import CarouselContainer, { CarouselContainerProps } from "./components/CarouselContainer";
+
+type VisibilityMap = {
+ [P in keyof CarouselContainerProps]: boolean;
+};
// tslint:disable class-name
export class preview exten... |
69d43e25f97e377efa1f2a840d18e6de629dd2e0 | src/delir-core/src/index.ts | src/delir-core/src/index.ts | // @flow
import * as Project from './project/index'
import Renderer from './renderer/renderer'
import * as Services from './services'
import * as Exceptions from './exceptions'
import ColorRGB from './struct/color-rgb'
import ColorRGBA from './struct/color-rgba'
import Type, {TypeDescriptor} from './plugin/type-descr... | // @flow
import * as Project from './project/index'
import Renderer from './renderer/renderer'
import * as Services from './services'
import * as Exceptions from './exceptions'
import ColorRGB from './struct/color-rgb'
import ColorRGBA from './struct/color-rgba'
import Type, {TypeDescriptor} from './plugin/type-descr... | Stop `export {...}` on delir-core | Stop `export {...}` on delir-core
`export default exports`でエラーが出始めて
`export _exports`とか試したけど出来なかったし、2箇所で同じような項目扱うのもめんどうなのでやめろ
| TypeScript | mit | Ragg-/Delir,Ragg-/Delir,Ragg-/Delir,Ragg-/Delir | ---
+++
@@ -39,5 +39,3 @@
// import shorthand
ProjectHelper,
}
-
-export default exports |
7431e7b7f62314135aeda6c6176f7ad80fc74e5f | app/src/models/account.ts | app/src/models/account.ts | import { getDotComAPIEndpoint, IAPIEmail } from '../lib/api'
/**
* A GitHub account, representing the user found on GitHub The Website or GitHub Enterprise Server.
*
* This contains a token that will be used for operations that require authentication.
*/
export class Account {
/** Create an account which can be ... | import { getDotComAPIEndpoint, IAPIEmail } from '../lib/api'
/**
* A GitHub account, representing the user found on GitHub The Website or GitHub Enterprise Server.
*
* This contains a token that will be used for operations that require authentication.
*/
export class Account {
/** Create an account which can be ... | Clarify that this isn't a desktop id | Clarify that this isn't a desktop id
| TypeScript | mit | artivilla/desktop,say25/desktop,kactus-io/kactus,say25/desktop,kactus-io/kactus,desktop/desktop,artivilla/desktop,shiftkey/desktop,kactus-io/kactus,shiftkey/desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,desktop/desktop,j-f1/forked-desktop,j-f1/forked-desktop,shiftkey/desktop,artivilla/desktop,desktop/de... | ---
+++
@@ -19,7 +19,7 @@
* @param token The access token used to perform operations on behalf of this account
* @param emails The current list of email addresses associated with the account
* @param avatarURL The profile URL to render for this account
- * @param id The database id for this account
+ ... |
085cabf8e01f485aac6ce87b0427e0de92022483 | tests/cases/fourslash/completionListInExtendsClause.ts | tests/cases/fourslash/completionListInExtendsClause.ts | /// <reference path='fourslash.ts' />
////interface IFoo {
//// method();
////}
////
////class Foo {
//// property: number;
//// method() { }
//// static staticMethod() { }
////}
////class test1 extends Foo./*1*/ {}
////class test2 implements IFoo./*2*/ {}
////interface test3 extends IFo... | /// <reference path='fourslash.ts' />
////interface IFoo {
//// method();
////}
////
////class Foo {
//// property: number;
//// method() { }
//// static staticMethod() { }
////}
////class test1 extends Foo./*1*/ {}
////class test2 implements IFoo./*2*/ {}
////interface test3 extends IFo... | Change test untill we have filtering on location | Change test untill we have filtering on location
| TypeScript | apache-2.0 | jteplitz602/TypeScript,AbubakerB/TypeScript,plantain-00/TypeScript,AbubakerB/TypeScript,chuckjaz/TypeScript,Mqgh2013/TypeScript,zmaruo/TypeScript,kimamula/TypeScript,MartyIX/TypeScript,DanielRosenwasser/TypeScript,HereSinceres/TypeScript,enginekit/TypeScript,OlegDokuka/TypeScript,ziacik/TypeScript,DLehenbauer/TypeScrip... | ---
+++
@@ -18,8 +18,15 @@
////interface test4 implements Foo./*4*/ {}
-test.markers().forEach((marker) => {
- goTo.position(marker.position, marker.fileName);
+goTo.marker("1");
+verify.completionListIsEmpty();
- verify.completionListIsEmpty();
-});
+goTo.marker("2");
+verify.completionListIsEmpty();
+
... |
50fbdb41bed90381a2d048c9b18e2f45ccdd1021 | src/v2/components/UI/Head/components/Title/index.tsx | src/v2/components/UI/Head/components/Title/index.tsx | import React from 'react'
import { unescape } from 'underscore'
import Head from 'v2/components/UI/Head'
export const TITLE_TEMPLATE = 'Are.na / %s'
interface Props {
children: string
}
export const Title: React.FC<Props> = ({ children }) => {
const title = TITLE_TEMPLATE.replace('%s', unescape(children))
re... | import React from 'react'
import { unescape } from 'underscore'
import Head from 'v2/components/UI/Head'
export const TITLE_TEMPLATE = '%s — Are.na'
interface Props {
children: string
}
export const Title: React.FC<Props> = ({ children }) => {
const title = TITLE_TEMPLATE.replace('%s', unescape(children))
re... | Switch title tag template so Are.na goes last | Switch title tag template so Are.na goes last
| TypeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -3,7 +3,7 @@
import Head from 'v2/components/UI/Head'
-export const TITLE_TEMPLATE = 'Are.na / %s'
+export const TITLE_TEMPLATE = '%s — Are.na'
interface Props {
children: string |
c8f77b9d9b0343270516ec591a53fd1853804125 | packages/kernel-relay/__tests__/index.spec.ts | packages/kernel-relay/__tests__/index.spec.ts | import { gql } from "apollo-server";
import { createTestClient } from "apollo-server-testing";
import { server } from "../src";
describe("Queries", () => {
it("returns a list of kernelspecs", async () => {
const { query } = createTestClient(server);
const kernelspecsQuery = gql`
query GetKernels {
... | import { gql } from "apollo-server";
import { createTestClient } from "apollo-server-testing";
import { server } from "../src";
describe("Queries", () => {
it("returns a list of kernelspecs", async () => {
const { query } = createTestClient(server);
const LIST_KERNELSPECS = gql`
query GetKernels {
... | Add tests for GraphQL mutations | Add tests for GraphQL mutations
| TypeScript | bsd-3-clause | nteract/nteract,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract,nteract/composition,nteract/composition | ---
+++
@@ -5,15 +5,52 @@
describe("Queries", () => {
it("returns a list of kernelspecs", async () => {
const { query } = createTestClient(server);
- const kernelspecsQuery = gql`
+ const LIST_KERNELSPECS = gql`
query GetKernels {
listKernelSpecs {
name
}
}
... |
cbbe9806d28df9a21f34bb30e5553721ed694d67 | saleor/static/dashboard-next/storybook/Decorator.tsx | saleor/static/dashboard-next/storybook/Decorator.tsx | import * as React from "react";
import AppActionContext from "../components/AppLayout/AppActionContext";
import { Provider as DateProvider } from "../components/Date/DateContext";
import { FormProvider } from "../components/Form";
import { MessageManager } from "../components/messages";
import ThemeProvider from "../c... | import * as React from "react";
import AppActionContext from "../components/AppLayout/AppActionContext";
import { Provider as DateProvider } from "../components/Date/DateContext";
import { FormProvider } from "../components/Form";
import { MessageManager } from "../components/messages";
import ThemeProvider from "../c... | Fix flex horizontal size issue | Fix flex horizontal size issue
| TypeScript | bsd-3-clause | maferelo/saleor,maferelo/saleor,mociepka/saleor,maferelo/saleor,mociepka/saleor,mociepka/saleor | ---
+++
@@ -24,7 +24,7 @@
padding: 24
}}
>
- {story}
+ <div style={{ flexGrow: 1 }}>{story}</div>
</div>
<div
style={{ |
5a7bb894e1a132e01ce63f75d7f6ac04eb46c2d1 | resources/app/auth/services/auth.service.ts | resources/app/auth/services/auth.service.ts | export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService
) {
'ngInject';
}
isLoggedIn() {
return this.$window.localStorage.getItem('token') !== null;
}
stati... | export interface IAuthService {
isLoggedIn();
}
export class AuthService {
static NAME = 'AuthService';
config;
url;
constructor(
private $http: ng.IHttpService,
private $window: ng.IWindowService,
private $httpParamSerializerJQLike: ng.IHttpParamSerializer
) {
'ngInject';
this.config... | Add user login method to AuthService | Add user login method to AuthService
| TypeScript | mit | ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io,ibnumalik/ibnumalik.github.io | ---
+++
@@ -4,20 +4,42 @@
export class AuthService {
static NAME = 'AuthService';
+ config;
+ url;
constructor(
private $http: ng.IHttpService,
- private $window: ng.IWindowService
+ private $window: ng.IWindowService,
+ private $httpParamSerializerJQLike: ng.IHttpParamSerializer
) {
... |
626efa502acdfdc5a26b09d3a9f7b15240d5f5ba | client/Utility/Metrics.ts | client/Utility/Metrics.ts | import { Store } from "./Store";
interface EventData {
[key: string]: any;
}
export class Metrics {
public static TrackLoad(): void {
const counts = {
Encounters: Store.List(Store.SavedEncounters).length,
NpcStatBlocks: Store.List(Store.StatBlocks).length,
PcStatBlo... | import { Store } from "./Store";
interface EventData {
[key: string]: any;
}
export class Metrics {
public static TrackLoad(): void {
const counts = {
Encounters: Store.List(Store.SavedEncounters).length,
NpcStatBlocks: Store.List(Store.StatBlocks).length,
PcStatBlo... | Add PersistentCharacter count to TrackLoad | Add PersistentCharacter count to TrackLoad
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -10,6 +10,7 @@
Encounters: Store.List(Store.SavedEncounters).length,
NpcStatBlocks: Store.List(Store.StatBlocks).length,
PcStatBlocks: Store.List(Store.PlayerCharacters).length,
+ PersistentCharacters: Store.List(Store.PersistentCharacters).length,
... |
4374f4b114bf5b2d58a00b071684fbebe2e7acb5 | src/views/index.tsx | src/views/index.tsx | import * as React from 'react';
export class Home extends React.Component<any, any> {
render() {
return (
<h1>Index</h1>
);
}
}
| import * as React from 'react';
import {Counter} from '../components/counter';
export class Home extends React.Component<any, any> {
render() {
return (
<div>
<h1>Index</h1>
<Counter />
</div>
);
}
}
| Update view to include Counter | Update view to include Counter
| TypeScript | mit | melxx001/redux-starter,melxx001/redux-starter | ---
+++
@@ -1,9 +1,12 @@
import * as React from 'react';
-
+import {Counter} from '../components/counter';
export class Home extends React.Component<any, any> {
render() {
return (
- <h1>Index</h1>
+ <div>
+ <h1>Index</h1>
+ <Counter />
+ </div>
);
}
} |
7fcd62b5adcce4ba83d28eacc276a4c9595f6deb | ui/src/api/image.ts | ui/src/api/image.ts | import { getHeaders } from './utils';
export const fetchImage = async (project: string,
id: string,
maxWidth: number,
maxHeight: number,
token: string): Promise<string> => {
const re... | export const fetchImage = async (project: string,
id: string,
maxWidth: number,
maxHeight: number,
token: string): Promise<string> => {
const imageUrl = getImageUrl(project, id, maxWi... | Make links work in frontend | Make links work in frontend
| TypeScript | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ---
+++
@@ -1,16 +1,15 @@
-import { getHeaders } from './utils';
-
export const fetchImage = async (project: string,
id: string,
maxWidth: number,
maxHeight: number,
token: string):... |
6b3d6c983b77eaaeb978b93ec12f0791cf8bfebf | src/lib/seeds/FactoryInterface.ts | src/lib/seeds/FactoryInterface.ts | import * as Faker from 'faker';
import { ObjectType } from 'typeorm';
import { EntityFactoryInterface } from './EntityFactoryInterface';
/**
* This interface is used to define new entity faker factories or to get such a
* entity faker factory to start seeding.
*/
export interface FactoryInterface {
/**
* Re... | import * as Faker from 'faker';
import { ObjectType } from 'typeorm';
import { EntityFactoryInterface } from './EntityFactoryInterface';
/**
* This interface is used to define new entity faker factories or to get such a
* entity faker factory to start seeding.
*/
export interface FactoryInterface {
/**
* Re... | Add missed parameter to the factory interface | Add missed parameter to the factory interface
| TypeScript | mit | w3tecch/express-typescript-boilerplate,w3tecch/express-typescript-boilerplate,w3tecch/express-typescript-boilerplate | ---
+++
@@ -9,7 +9,7 @@
/**
* Returns an EntityFactoryInterface
*/
- get<Entity>(entityClass: ObjectType<Entity>): EntityFactoryInterface<Entity>;
+ get<Entity>(entityClass: ObjectType<Entity>, args: any[]): EntityFactoryInterface<Entity>;
/**
* Define an entity faker
*/ |
acb50bc698508d46198440c85380493d7ddd6064 | src/lib/hashingFunctions.ts | src/lib/hashingFunctions.ts | const _addition = (a, b) => {
return a + b;
};
const _subtraction = (a, b) => {
return a - b;
};
const _multiplication = (a, b) => {
return a * b;
};
export const sum = array => {
return array.reduce(_addition, 0);
};
export const sumAndDiff = array => {
return array.reduce((prev, curr, index) => {
if... | const isEven: (num: number) => boolean = num => num % 2 === 0;
export const sum: (array: number[]) => number = arr =>
arr.reduce((a, b) => a + b, 0);
export const sumAndDiff: (array: number[]) => number = array =>
array.reduce(
(prev, curr, index) => (isEven(index) ? prev + curr : prev - curr),
0,
);
| Clean up our hashing functions | Clean up our hashing functions
Use arrow functions with implicit returns to clean up most of this basic
math.
Also removes some pretty basic add/subtract functions, along with an
unused product function.
| TypeScript | mit | adorableio/avatars-api | ---
+++
@@ -1,29 +1,10 @@
-const _addition = (a, b) => {
- return a + b;
-};
+const isEven: (num: number) => boolean = num => num % 2 === 0;
-const _subtraction = (a, b) => {
- return a - b;
-};
+export const sum: (array: number[]) => number = arr =>
+ arr.reduce((a, b) => a + b, 0);
-const _multiplication = (... |
274a23a6e6860c7195b64629efda576237dded79 | packages/apollo-link-utilities/src/__tests__/index.ts | packages/apollo-link-utilities/src/__tests__/index.ts | import { Observable, ApolloLink, execute } from 'apollo-link';
import gql from 'graphql-tag';
import * as fetchMock from 'fetch-mock';
import {
parseAndCheckHttpResponse,
selectHttpOptionsAndBody,
selectURI,
serializeFetchBody,
} from '../index';
const sampleQuery = gql`
query SampleQuery {
stub {
... | import { Observable, ApolloLink, execute } from 'apollo-link';
import gql from 'graphql-tag';
import * as fetchMock from 'fetch-mock';
import {
parseAndCheckHttpResponse,
selectHttpOptionsAndBody,
selectURI,
serializeFetchBody,
} from '../index';
const sampleQuery = gql`
query SampleQuery {
stub {
... | Add tests for serializeFetchBody utility fn | Add tests for serializeFetchBody utility fn
| TypeScript | mit | apollographql/apollo-link,apollographql/apollo-link | ---
+++
@@ -35,9 +35,20 @@
it('returns the result of a UriFunction', () => {});
});
- describe('serializeBody', () => {
- it('throws a parse error on an unparsable body', () => {});
- it('returns a correctly parsed body', () => {});
+ describe('serializeFetchBody', () => {
+ it('thr... |
12053a29dc699f14db4adc6c28eb86b4433d05b1 | src/js/View/Components/NotificationFilters/Index.tsx | src/js/View/Components/NotificationFilters/Index.tsx | import * as React from 'react';
import { createGitHubNotificationFilterSet } from 'Helpers/Models/GitHubNotificationFilterSet';
import NotificationFilterStringFilter from './NotificationFilterStringFilter';
import NotificationFilterRepositoryFilter from './NotificationFilterRepositoryFilter';
interface INotification... | import * as React from 'react';
import {
getNotificationReasonPrettyName,
getNotificationSubjectPrettyName
} from 'Helpers/Services/GitHub';
import { createGitHubNotificationFilterSet } from 'Helpers/Models/GitHubNotificationFilterSet';
import NotificationFilterStringFilter from './NotificationFilterStringFilter'... | Format names and classes for filters | Format names and classes for filters
| TypeScript | mit | harksys/HawkEye,harksys/HawkEye,harksys/HawkEye | ---
+++
@@ -1,9 +1,15 @@
import * as React from 'react';
+import {
+ getNotificationReasonPrettyName,
+ getNotificationSubjectPrettyName
+} from 'Helpers/Services/GitHub';
import { createGitHubNotificationFilterSet } from 'Helpers/Models/GitHubNotificationFilterSet';
import NotificationFilterStringFilter fro... |
2ded93c2eceeede0237595745a2f4b54a63157e2 | analysis/tbchunter/src/metrics/growlCasts.ts | analysis/tbchunter/src/metrics/growlCasts.ts | import { AnyEvent } from 'parser/core/Events';
import metric from 'parser/core/metric';
import castCount from 'parser/shared/metrics/castCount';
import * as SPELLS from '../SPELLS_PET';
/**
* Returns the max amount of Kill Command casts considering the buff uptime.
* Does not account for fluctuating cooldowns.
*/
... | import { AnyEvent } from 'parser/core/Events';
import metric from 'parser/core/metric';
import castCount from 'parser/shared/metrics/castCount';
import lowRankSpellsPet from '../lowRankSpellsPet';
import * as SPELLS from '../SPELLS_PET';
/**
* Returns the max amount of Kill Command casts considering the buff uptime.... | Fix Growl suggestion did not consider lower rank Growls | tbchunter: Fix Growl suggestion did not consider lower rank Growls
| TypeScript | agpl-3.0 | sMteX/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,Juko8/WoWAnalyzer,sMteX/WoWAnalyzer,WoWAnalyzer/WoWAnalyzer | ---
+++
@@ -2,6 +2,7 @@
import metric from 'parser/core/metric';
import castCount from 'parser/shared/metrics/castCount';
+import lowRankSpellsPet from '../lowRankSpellsPet';
import * as SPELLS from '../SPELLS_PET';
/**
@@ -12,7 +13,11 @@
pets.reduce((sum, pet) => {
const casts = castCount(events, pet... |
e5da9ab12177da0da33cc18fe20c9dbc14ac5b2a | src/components/ScoreBox.tsx | src/components/ScoreBox.tsx | import * as React from 'react';
export interface ScoreBoxProps {
score: number | null,
bid: number | null,
tricks: number | null
};
const border = '1px solid black';
export default class extends React.Component<ScoreBoxProps, {}> {
render() {
return (
<div style={{display: 'flex'}}>
<div st... | import * as React from 'react';
export interface ScoreBoxProps {
score: number | null,
bid: number | undefined,
tricks: number | undefined
};
const border = '1px solid black';
export default class extends React.Component<ScoreBoxProps, {}> {
render() {
return (
<div style={{display: 'flex'}}>
... | Fix styling with score box | Fix styling with score box
| TypeScript | mit | jeffcharles/wizard-scorekeeper,jeffcharles/wizard-scorekeeper,jeffcharles/wizard-scorekeeper,jeffcharles/wizard-scorekeeper | ---
+++
@@ -2,8 +2,8 @@
export interface ScoreBoxProps {
score: number | null,
- bid: number | null,
- tricks: number | null
+ bid: number | undefined,
+ tricks: number | undefined
};
const border = '1px solid black';
@@ -12,10 +12,10 @@
render() {
return (
<div style={{display: 'flex'}}>... |
1123057da3728015853bb8ac859e296575bc4ef7 | app/src/lib/is-git-on-path.ts | app/src/lib/is-git-on-path.ts | import { spawn } from 'child_process'
import * as Path from 'path'
export function isGitOnPath(): Promise<boolean> {
// Modern versions of macOS ship with a Git shim that guides you through
// the process of setting everything up. We trust this is available, so
// don't worry about looking for it here.
// I de... | import { spawn } from 'child_process'
import * as Path from 'path'
export function isGitOnPath(): Promise<boolean> {
// Modern versions of macOS ship with a Git shim that guides you through
// the process of setting everything up. We trust this is available, so
// don't worry about looking for it here.
if (__D... | Check if git is found under PATH on Linux | Check if git is found under PATH on Linux
| TypeScript | mit | shiftkey/desktop,kactus-io/kactus,desktop/desktop,desktop/desktop,j-f1/forked-desktop,kactus-io/kactus,artivilla/desktop,j-f1/forked-desktop,say25/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,artivilla/desktop,j-f1/forked-desktop,say25/desktop,desktop/desktop,shiftkey/desktop,kactus-io/kactus,shiftkey/de... | ---
+++
@@ -5,14 +5,13 @@
// Modern versions of macOS ship with a Git shim that guides you through
// the process of setting everything up. We trust this is available, so
// don't worry about looking for it here.
- // I decide linux user have git too :)
- if (__DARWIN__ || __LINUX__) {
+ if (__DARWIN__) {... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.