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 |
|---|---|---|---|---|---|---|---|---|---|---|
05e92d2080b5098e7eea0c1e136af75fd565c4d7 | source/scripts/setup-plugins.ts | source/scripts/setup-plugins.ts | import * as child_process from "child_process"
import jsonDatabase from "../db/json"
import { DATABASE_JSON_FILE } from "../globals"
if (process.env.NO_RECURSE) {
process.exit(0)
}
const log = console.log
const go = async () => {
// Download settings
const db = jsonDatabase(DATABASE_JSON_FILE)
await db.setu... | import * as child_process from "child_process"
import jsonDatabase from "../db/json"
import { DATABASE_JSON_FILE } from "../globals"
const log = console.log
const go = async () => {
// Download settings
const db = jsonDatabase(DATABASE_JSON_FILE)
await db.setup()
const installation = await db.getInstallatio... | Make yarn not run build scripts | Make yarn not run build scripts
| TypeScript | mit | danger/peril,danger/peril,danger/peril,danger/peril,danger/peril | ---
+++
@@ -2,10 +2,6 @@
import jsonDatabase from "../db/json"
import { DATABASE_JSON_FILE } from "../globals"
-
-if (process.env.NO_RECURSE) {
- process.exit(0)
-}
const log = console.log
@@ -23,13 +19,16 @@
const plugins = installation.settings.plugins
log("Installing: " + plugins.join(", "))
... |
2bcb76339897101fcac845fb6c5b3c9507dbb0c7 | jade/jade-tests.ts | jade/jade-tests.ts | /// <reference path="jade.d.ts"/>
import jade = require('jade');
jade.compile("b")();
jade.compileFile("foo.jade", {})();
jade.compileClient("a")({ a: 1 });
jade.compileClientWithDependenciesTracked("test").body();
jade.render("h1",{});
jade.renderFile("foo.jade"); | /// <reference path="jade.d.ts"/>
import * as jade from 'jade';
jade.compile("b")();
jade.compileFile("foo.jade", {})();
jade.compileClient("a")({ a: 1 });
jade.compileClientWithDependenciesTracked("test").body();
jade.render("h1",{});
jade.renderFile("foo.jade");
| Make use of es6 import | Make use of es6 import
| TypeScript | mit | shlomiassaf/DefinitelyTyped,Softpagehomeware/DefinitelyTyped,jimthedev/DefinitelyTyped,jraymakers/DefinitelyTyped,georgemarshall/DefinitelyTyped,schmuli/DefinitelyTyped,chbrown/DefinitelyTyped,Pro/DefinitelyTyped,damianog/DefinitelyTyped,benishouga/DefinitelyTyped,GiedriusGrabauskas/DefinitelyTyped,ryan10132/Definitely... | ---
+++
@@ -1,6 +1,6 @@
/// <reference path="jade.d.ts"/>
-import jade = require('jade');
+import * as jade from 'jade';
jade.compile("b")();
jade.compileFile("foo.jade", {})(); |
3f88134dc331b319cecd4c4ddc2ab5c994563774 | types/components/CollectionItem.d.ts | types/components/CollectionItem.d.ts | import * as React from 'react';
import { SharedBasic } from './utils';
export interface CollectionItemProps extends SharedBasic {
active?: boolean;
href: string;
}
/**
* React Materialize: CollectionItem
*/
declare const CollectionItem: React.FC<CollectionItemProps>
export default CollectionItem;
| import * as React from 'react';
import { SharedBasic } from './utils';
export interface CollectionItemProps extends SharedBasic {
active?: boolean;
href?: string;
}
/**
* React Materialize: CollectionItem
*/
declare const CollectionItem: React.FC<CollectionItemProps>
export default CollectionItem;
| Fix href requirement in CollectionItem's typings | Fix href requirement in CollectionItem's typings | TypeScript | mit | react-materialize/react-materialize,react-materialize/react-materialize,react-materialize/react-materialize | ---
+++
@@ -3,7 +3,7 @@
export interface CollectionItemProps extends SharedBasic {
active?: boolean;
- href: string;
+ href?: string;
}
/** |
b2cca406bb679fb21eb956a47eec883bc08b48de | src/app/projects/projects.module.ts | src/app/projects/projects.module.ts | import { NgModule, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes, Route } from '@angular/router';
import { SharedModule } from '../shared/shared.module';
import { DisambiguationPageComponent } from './disambiguation-page/disambiguation-page.component';... | import { NgModule, Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule, Routes, Route } from '@angular/router';
import { SharedModule } from '../shared/shared.module';
import { DisambiguationPageComponent } from './disambiguation-page/disambiguation-page.component';... | Use constants instead of magic strings for feature toggles | Use constants instead of magic strings for feature toggles
| TypeScript | apache-2.0 | jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog,jbrowneuk/jblog | ---
+++
@@ -6,6 +6,7 @@
import { DisambiguationPageComponent } from './disambiguation-page/disambiguation-page.component';
import { environment } from '../../environments/environment.prod';
+import { FEATURE_TOGGLES } from '../shared/feature-toggles';
const sectionId = 3.0;
@@ -14,7 +15,7 @@
{ path: 'code... |
3f9d4dbc3ed6a1a395763085b8393e58618fc0cc | game/hordetest/hud/src/components/HUD/ActiveObjectives/index.tsx | game/hordetest/hud/src/components/HUD/ActiveObjectives/index.tsx | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import React, { useContext } from 'react';
import { styled } from '@csegames/linaria/react';
import { ActiveOb... | /*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import React, { useContext } from 'react';
import { styled } from '@csegames/linaria/react';
import { ActiveOb... | Sort objectives by entity id | Sort objectives by entity id
| TypeScript | mpl-2.0 | csegames/Camelot-Unchained,csegames/Camelot-Unchained,csegames/Camelot-Unchained | ---
+++
@@ -35,9 +35,11 @@
return objectiveColor.color;
}
+ const sortedObjectives = activeObjectivesContext.activeObjectives.sort((a, b) =>
+ a.entityState.entityID.localeCompare(b.entityState.entityID));
return (
<Container>
- {activeObjectivesContext.activeObjectives.map((objective) => {... |
901618a3fc1563662277d40d00202bd906d69852 | packages/components/containers/topBanners/WelcomeV4TopBanner.tsx | packages/components/containers/topBanners/WelcomeV4TopBanner.tsx | import React from 'react';
import { c } from 'ttag';
import { APPS, SSO_PATHS } from 'proton-shared/lib/constants';
import TopBanner from './TopBanner';
import { useConfig } from '../../hooks';
import { Href } from '../../components';
const IS_INITIAL_LOGIN = [SSO_PATHS.AUTHORIZE, SSO_PATHS.LOGIN, '/'].includes(windo... | import React from 'react';
import { c } from 'ttag';
import { APPS, SSO_PATHS } from 'proton-shared/lib/constants';
import TopBanner from './TopBanner';
import { useConfig } from '../../hooks';
import { Href } from '../../components';
const IS_INITIAL_LOGIN = [SSO_PATHS.AUTHORIZE, SSO_PATHS.LOGIN, '/'].includes(windo... | Update copy for welcome banner | Update copy for welcome banner
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -15,13 +15,18 @@
return null;
}
+ const learnMoreLink = (
+ <Href
+ key="learn-more-link"
+ className="underline inline-block color-inherit"
+ url="https://protonmail.com/blog/new-protonmail"
+ >{c('Link').t`learn more`}</Href>
+ );
+
... |
b255e7e03825f043fc06b89f2778a362941d4eb4 | src/extra/utils.ts | src/extra/utils.ts | import marked from 'marked';
import sanitizeHtml from 'sanitize-html';
const renderer = new marked.Renderer();
renderer.link = function(_href, _title, _text) {
const link = marked.Renderer.prototype.link.apply(this, arguments);
return link.replace('<a', '<a target="_blank" rel="noopener noreferrer"');
};
const mar... | import marked from 'marked';
import sanitizeHtml from 'sanitize-html';
const renderer = new marked.Renderer();
renderer.link = function(_href, _title, _text) {
const link = marked.Renderer.prototype.link.apply(this, arguments);
return link.replace('<a', '<a target="_blank" rel="noopener noreferrer"');
};
const mar... | Allow span tags to be preserved | Markdown: Allow span tags to be preserved
Change-type: patch
Signed-off-by: Lucian <4ccb12931fcb94d148e83438378607ae0dc0c15d@gmail.com> | TypeScript | mit | resin-io-modules/resin-components,resin-io-modules/resin-components,resin-io-modules/resin-components | ---
+++
@@ -26,6 +26,7 @@
'h2',
'img',
'input',
+ 'span',
]),
allowedAttributes: {
a: ['href', 'name', 'target', 'rel'], |
5a7077facb2fe79f4f06ad0187ebf87f4687462d | src/utils/templates.ts | src/utils/templates.ts | import * as vsc from 'vscode'
import * as glob from 'glob'
import { IPostfixTemplate } from '../template'
import { CustomTemplate } from '../templates/customTemplate'
export const loadCustomTemplates = () => {
const config = vsc.workspace.getConfiguration('postfix')
const templates = config.get<ICustomTempl... | import * as vsc from 'vscode'
import * as glob from 'glob'
import { IPostfixTemplate } from '../template'
import { CustomTemplate } from '../templates/customTemplate'
export const loadCustomTemplates = () => {
const config = vsc.workspace.getConfiguration('postfix')
const templates = config.get<ICustomTempl... | Fix bug after moving utils around | Fix bug after moving utils around
| TypeScript | mit | ipatalas/vscode-postfix-ts,ipatalas/vscode-postfix-ts | ---
+++
@@ -14,7 +14,7 @@
export const loadBuiltinTemplates = () => {
const templates: IPostfixTemplate[] = []
- let files = glob.sync('./templates/*.js', { cwd: __dirname })
+ let files = glob.sync('../templates/*.js', { cwd: __dirname })
files.forEach(path => {
let builder: () => IPostfixTemplate ... |
262307550979bcdd5b5e78615498497aa4f6c852 | src/vmware/provider.ts | src/vmware/provider.ts | import { pick } from '@waldur/core/utils';
import * as ProvidersRegistry from '@waldur/providers/registry';
import { VMwareForm } from './VMwareForm';
const serializer = pick([
'username',
'password',
]);
ProvidersRegistry.register({
name: 'VMware',
type: 'VMware',
icon: 'icon-vmware.png',
endpoint: 'vmw... | import { pick } from '@waldur/core/utils';
import * as ProvidersRegistry from '@waldur/providers/registry';
import { VMwareForm } from './VMwareForm';
const serializer = pick([
'backend_url',
'username',
'password',
'default_cluster_label',
'max_cpu',
'max_ram',
'max_disk',
'max_disk_total',
]);
Prov... | Allow to update limits and credentials for VMware service settings | Allow to update limits and credentials for VMware service settings [WAL-2796]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -4,8 +4,14 @@
import { VMwareForm } from './VMwareForm';
const serializer = pick([
+ 'backend_url',
'username',
'password',
+ 'default_cluster_label',
+ 'max_cpu',
+ 'max_ram',
+ 'max_disk',
+ 'max_disk_total',
]);
ProvidersRegistry.register({ |
f2605cb814c11dbf2fa006c890b509e1052e975f | app/src/component/TaskDescription.tsx | app/src/component/TaskDescription.tsx | import * as React from "react";
import Markdown = require("react-markdown");
import InputComponent from "./InputComponent";
import "./style/TaskDescription.css";
export default class extends InputComponent {
public render() {
if (this.state.editing) {
return (
<textarea
... | import * as React from "react";
import Markdown = require("react-markdown");
import InputComponent from "./InputComponent";
import "./style/TaskDescription.css";
export default class extends InputComponent {
public render() {
if (this.state.editing) {
return (
<textarea
... | Fix anchor tag behavior in task descriptions | Fix anchor tag behavior in task descriptions
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -27,7 +27,22 @@
return (
<div onClick={() => this.setState({ editing: true })}>
{text.trim()
- ? <Markdown className="TaskDescription-markdown" source={text} />
+ ? (
+ <Markdown
+ ... |
b11d615eb662f32e16e5129eac423d9ff18ea1bb | src/load.ts | src/load.ts | import { join } from 'path';
import Config, { Middleware } from './Config';
import ConfigLoader from './ConfigLoader';
import SecureMiddleware from './middleware/SecureMiddleware';
let middleware: Middleware | undefined;
if (process.env.NODE_CONFIG_PRIVATE_KEY) {
middleware = new SecureMiddleware(process.env.NODE_CO... | import { join } from 'path';
import Config, { Middleware } from './Config';
import ConfigLoader from './ConfigLoader';
import SecureMiddleware from './middleware/SecureMiddleware';
let middleware: Middleware | undefined;
if (process.env.NODE_CONFIG_PRIVATE_KEY) {
const privateKey = new Buffer(process.env.NODE_CONFIG... | Change NODE_CONFIG_PRIVATE_KEY to set Base64 string | Change NODE_CONFIG_PRIVATE_KEY to set Base64 string
| TypeScript | mit | kou64yama/nobushi-config | ---
+++
@@ -5,7 +5,8 @@
let middleware: Middleware | undefined;
if (process.env.NODE_CONFIG_PRIVATE_KEY) {
- middleware = new SecureMiddleware(process.env.NODE_CONFIG_PRIVATE_KEY);
+ const privateKey = new Buffer(process.env.NODE_CONFIG_PRIVATE_KEY, 'base64');
+ middleware = new SecureMiddleware(privateKey.toS... |
6d5f134266ff267f2d090691b02953d8e3822f95 | src/app/core/images/imagestore/image-converter.ts | src/app/core/images/imagestore/image-converter.ts | import {Injectable} from '@angular/core';
const nativeImage = typeof window !== 'undefined'
? window.require('electron').nativeImage
: require('electron').nativeImage;
const Jimp = typeof window !== 'undefined' ? window.require('jimp') : require('jimp');
@Injectable()
/**
* @author F.Z.
* @author Daniel de... | import {Injectable} from '@angular/core';
const nativeImage = typeof window !== 'undefined'
? window.require('electron').nativeImage
: require('electron').nativeImage;
const Jimp = typeof window !== 'undefined' ? window.require('jimp') : require('jimp');
const TARGET_HEIGHT = 320;
const TARGET_JPEG_QUALITY =... | Use constants for conversion target values | Use constants for conversion target values
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -4,6 +4,10 @@
? window.require('electron').nativeImage
: require('electron').nativeImage;
const Jimp = typeof window !== 'undefined' ? window.require('jimp') : require('jimp');
+
+
+const TARGET_HEIGHT = 320;
+const TARGET_JPEG_QUALITY = 60;
@Injectable()
@@ -20,7 +24,7 @@
const ... |
1c5a0b68f7d0f3ac3272142d5a37dc383834a08d | client/components/paper/paper.service.ts | client/components/paper/paper.service.ts | import { Injectable } from '@angular/core';
import { Headers, Http, Response } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { Subject } from '../../sharedClasses/subject'
import { Question } from '../../sharedClasses/question';
@Injectable()
export class PaperService {
constructor(private ... | import { Injectable } from '@angular/core';
import { Headers, Http, Response } from '@angular/http';
import 'rxjs/add/operator/toPromise';
import { Subject } from '../../sharedClasses/subject'
import { Question } from '../../sharedClasses/question';
@Injectable()
export class PaperService {
constructor(private ... | Add implementation for calculating total time for quiz | Add implementation for calculating total time for quiz
| TypeScript | mit | shavindraSN/examen,shavindraSN/examen,shavindraSN/examen | ---
+++
@@ -20,8 +20,12 @@
.catch(this.handleError)
}
- calculateTotalTime(questionArray): number {
- return
+ calculateTotalTime(questionArray: Question[]): number {
+ let totalTime = 0;
+ for(let question of questionArray) {
+ totalTime += question.question_... |
09e65fc25e2ff9a5dac6df1d2b0670027752c942 | test/unittests/front_end/test_setup/test_setup.ts | test/unittests/front_end/test_setup/test_setup.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.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Commo... | // 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.
/*
* This file is automatically loaded and run by Karma because it automatically
* loads and injects all *.js files it finds.
*/
import type * as Commo... | Clear sinon stubs between each unit test | Clear sinon stubs between each unit test
Consider the following unit tests:
```
describe.only('jack test', () => {
const someObj = {
foo() {
return 2;
},
};
it('does a thing', () => {
const stub = sinon.stub(someObj, 'foo').callsFake(() => {
return 5;
})
assert.strictEqual(someOb... | TypeScript | bsd-3-clause | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | ---
+++
@@ -17,6 +17,11 @@
this.timeout(10000);
});
+afterEach(() => {
+ // Clear out any Sinon stubs or spies between individual tests.
+ sinon.restore();
+});
+
beforeEach(() => {
// Some unit tests exercise code that assumes a ThemeSupport instance is available.
// Run this in a beforeEach in case a... |
37442b92aed4395e76fdce30580c6cf519fe7fd0 | src/utils/units.ts | src/utils/units.ts | /*
Copyright 2020 The Matrix.org Foundation C.I.C.
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 required by applicable law or agreed to in ... | /*
Copyright 2020 The Matrix.org Foundation C.I.C.
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 required by applicable law or agreed to in ... | Update read receipt remainder for internal font size change | Update read receipt remainder for internal font size change
In https://github.com/matrix-org/matrix-react-sdk/pull/4725, we changed the
internal font size from 15 to 10, but the `toRem` function (currently only used
for read receipts remainders curiously) was not updated. This updates the
function, which restores the ... | TypeScript | apache-2.0 | matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk | ---
+++
@@ -19,7 +19,7 @@
// converts a pixel value to rem.
export function toRem(pixelValue: number): string {
- return pixelValue / 15 + "rem";
+ return pixelValue / 10 + "rem";
}
export function toPx(pixelValue: number): string { |
36ff413878bfed46aad013a62a102df981a7c10b | packages/components/containers/login/AbuseModal.tsx | packages/components/containers/login/AbuseModal.tsx | import { c } from 'ttag';
import { AlertModal, Button, Href } from '../../components';
interface Props {
message?: string;
open: boolean;
onClose: () => void;
}
const AbuseModal = ({ message, open, onClose }: Props) => {
const contactLink = (
<Href url="https://protonmail.com/abuse" key={1}>
... | import { c } from 'ttag';
import { AlertModal, Button, Href } from '../../components';
interface Props {
message?: string;
open: boolean;
onClose: () => void;
}
const AbuseModal = ({ message, open, onClose }: Props) => {
const contactLink = (
<Href url="https://protonmail.com/abuse" key={1}>
... | Fix abuse modal close text | Fix abuse modal close text
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -19,7 +19,7 @@
open={open}
title={c('Title').t`Account suspended`}
onClose={onClose}
- buttons={<Button onClick={onClose}>{c('Action').t`I understand`}</Button>}
+ buttons={<Button onClick={onClose}>{c('Action').t`Close`}</Button>}
>
... |
c6ad36326a792b1c41f531f2b83fa438d2dc98de | src/components/publishing/embed.tsx | src/components/publishing/embed.tsx | import * as React from "react"
import styled, { StyledFunction } from "styled-components"
interface EmbedProps {
section: any
}
const Embed: React.SFC<EmbedProps> = props => {
const { url, height, mobile_height } = props.section
return <IFrame src={url} scrolling="no" frameBorder="0" height={height} mobileHeigh... | import * as React from "react"
import styled, { StyledFunction } from "styled-components"
import { pMedia } from "../helpers"
interface EmbedProps {
section: any
}
const Embed: React.SFC<EmbedProps> = props => {
const { url, height, mobile_height } = props.section
return <IFrame src={url} scrolling="no" frameBo... | Fix query and remove duplicate prop | Fix query and remove duplicate prop
| TypeScript | mit | artsy/reaction,artsy/reaction-force,xtina-starr/reaction,xtina-starr/reaction,xtina-starr/reaction,craigspaeth/reaction,craigspaeth/reaction,artsy/reaction,artsy/reaction,artsy/reaction-force,craigspaeth/reaction,xtina-starr/reaction | ---
+++
@@ -1,5 +1,6 @@
import * as React from "react"
import styled, { StyledFunction } from "styled-components"
+import { pMedia } from "../helpers"
interface EmbedProps {
section: any
@@ -15,14 +16,14 @@
height: number
}
-const iframe: StyledFunction<FrameProps & React.HTMLProps<HTMLIFrameElement>> =... |
a4edaaeec0f09d6ebf22c5bf60b5cb69be09f700 | tests/runners/fourslash/fsrunner.ts | tests/runners/fourslash/fsrunner.ts | ///<reference path='..\..\..\src\harness\fourslash.ts' />
///<reference path='..\runnerbase.ts' />
class FourslashRunner extends RunnerBase
{
public runTests()
{
var runSingleFourslashTest = (fn: string) => {
var justName = fn.replace(/^.*[\\\/]/, '');
if (!justName.m... | ///<reference path='..\..\..\src\harness\fourslash.ts' />
///<reference path='..\runnerbase.ts' />
class FourslashRunner extends RunnerBase
{
public runTests()
{
var runSingleFourslashTest = (fn: string) => {
var justName = fn.replace(/^.*[\\\/]/, '');
if (!justName.m... | Add the option to run a single Fourslash test. | Add the option to run a single Fourslash test.
| TypeScript | apache-2.0 | mbebenita/shumway.ts,hippich/typescript,fdecampredon/jsx-typescript-old-version,tarruda/typescript,fdecampredon/jsx-typescript-old-version,rbirkby/typescript,popravich/typescript,mbebenita/shumway.ts,tarruda/typescript,guidobouman/typescript,hippich/typescript,vcsjones/typescript,guidobouman/typescript,mbebenita/shumwa... | ---
+++
@@ -17,8 +17,11 @@
}
}
- //runSingleFourslashTest(Harness.userSpecifiedroot + 'tests/cases/fourslash/comments_Interface.ts');
- this.enumerateFiles('tests/cases/fourslash').forEach(runSingleFourslashTest);
+ if (this.tests.length === 0) {
+ this.tests = ... |
2ae5a4da84806649dec272732ea635bfbbb87e4f | src/newtab/components/App/styles.ts | src/newtab/components/App/styles.ts | import styled from 'styled-components';
import images from '../../../shared/mixins/images';
import typography from '../../../shared/mixins/typography';
import opacity from '../../../shared/defaults/opacity';
export const StyledApp = styled.div`
width: 100%;
height: 100vh;
`;
export interface ContentProps {
vis... | import styled from 'styled-components';
import images from '../../../shared/mixins/images';
import typography from '../../../shared/mixins/typography';
import opacity from '../../../shared/defaults/opacity';
export const StyledApp = styled.div`
width: 100%;
height: 100vh;
`;
export interface ContentProps {
vis... | Fix credits in new tab | :bugs: Fix credits in new tab
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -19,6 +19,7 @@
flex-flow: row;
position: relative;
padding-top: 24px;
+ padding-bottom: 24px;
background-color: #f5f5f5;
flex-wrap: wrap;
@@ -33,12 +34,24 @@
`;
export const Credits = styled.div`
+ width: 100%;
+ height: 24px;
+ display: flex;
+ align-items: center;
position: f... |
f315130d67ee02f50dd9ad56e1c4b314e3d85639 | postponed/firestore-mirror-bigquery/functions/src/firestoreEventHistoryTracker.ts | postponed/firestore-mirror-bigquery/functions/src/firestoreEventHistoryTracker.ts | /*
* Copyright 2019 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | /*
* Copyright 2019 Google LLC
*
* 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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to i... | Change FirestoreDocumentChangeEvent to an interface | Change FirestoreDocumentChangeEvent to an interface
| TypeScript | apache-2.0 | firebase/extensions,firebase/extensions,firebase/extensions,firebase/extensions,firebase/extensions | ---
+++
@@ -20,14 +20,12 @@
UPDATED
}
-export class FirestoreDocumentChangeEvent {
- constructor(
- public timestamp: string,
- public operation: ChangeType,
- public name: string,
- public eventId: string,
- public data: Object
- );
+export interface FirestoreDocumentChangeEvent {
+ timestamp... |
8f33c6fee6799abc36fd5084adddf983a569f56c | server/src/actions/proxy.ts | server/src/actions/proxy.ts | import axios from 'axios';
import { Request, Response } from 'express';
interface ProxyRequest {
body: string;
headers: { [name: string]: string };
method: string;
url: string;
}
export function proxy(req: Request, res: Response) {
const content = req.body as ProxyRequest;
const request = {
... | import axios from 'axios';
import { Request, Response } from 'express';
interface ProxyRequest {
body: string;
headers: { [name: string]: string };
method: string;
url: string;
}
export function proxy(req: Request, res: Response) {
const content = req.body as ProxyRequest;
const request = {
... | Return data on error from the server | Return data on error from the server
| TypeScript | apache-2.0 | projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/AzureFunctions,projectkudu/WebJobsPortal,projectkudu/WebJobsPortal,projectkudu/WebJobsPortal,projectkudu/AzureFunctions,projectkudu/WebJobsPortal | ---
+++
@@ -20,7 +20,7 @@
.then(r => res.send(r.data))
.catch(e => {
if (e.response && e.response.status) {
- res.status(e.response.status).send(e.response);
+ res.status(e.response.status).send(e.response.data);
} else if (e.request) {
... |
e33a1cd26c593b58046b73d61bb8abcd9c299289 | src/renderer/script/settings/settings.ts | src/renderer/script/settings/settings.ts | // Copyright 2016 underdolphin(masato sueda)
//
// 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... | // Copyright 2016 underdolphin(masato sueda)
//
// 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 reference path of typings | Fix reference path of typings
| TypeScript | apache-2.0 | underdolphin/SoundRebuild,underdolphin/SoundRebuild,underdolphin/SoundRebuild | ---
+++
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-/// <reference path="../../../typings/index.d.ts" />
+/// <reference path="../../../../typings/index.d.ts" />
Polymer({
is: "settings-element" |
51caf25c0747f10fc054d320695d716778ee8556 | src/app/app.progress-bar.service.ts | src/app/app.progress-bar.service.ts | import { Injectable } from '@angular/core';
@Injectable()
export class ProgressBarService {
protected visible = true;
constructor() { }
setVisible() {
this.visible = true;
}
setHidden() {
this.visible = false;
}
}
| import { Injectable } from '@angular/core';
@Injectable()
export class ProgressBarService {
protected visible = false;
constructor() { }
setVisible() {
this.visible = true;
}
setHidden() {
this.visible = false;
}
}
| Change default state to invisible | Change default state to invisible
| TypeScript | bsd-3-clause | UoA-eResearch/research-hub,UoA-eResearch/research-hub,UoA-eResearch/research-hub | ---
+++
@@ -3,7 +3,7 @@
@Injectable()
export class ProgressBarService {
- protected visible = true;
+ protected visible = false;
constructor() { }
|
f47ce0a04698bc01dae6412befb9aa6eed4e8eba | index.ts | index.ts | import Dimensions from "./dimensions";
var dimensions = new Dimensions(); | import Dimensions from "./dimensions";
import * as fs from "fs";
process.on('uncaughtException', function(e) {
fs.appendFile('../error-log.txt', `${e}\n`, function (err) {
});
});
var dimensions = new Dimensions(); | Add exception catcher due to unknown crash bug | Add exception catcher due to unknown crash bug
| TypeScript | mit | popstarfreas/Dimensions,popstarfreas/Dimensions,popstarfreas/Dimensions | ---
+++
@@ -1,2 +1,10 @@
import Dimensions from "./dimensions";
+import * as fs from "fs";
+
+process.on('uncaughtException', function(e) {
+ fs.appendFile('../error-log.txt', `${e}\n`, function (err) {
+
+ });
+});
+
var dimensions = new Dimensions(); |
1b65b3cafbae2c7e908df65dab3b8d8aab949a86 | src/components/Queue/EmptyQueue.tsx | src/components/Queue/EmptyQueue.tsx | import * as React from 'react';
import { EmptyState } from '@shopify/polaris';
export interface Handlers {
onRefresh: () => void;
}
const EmptyQueue = ({ onRefresh }: Handlers) => {
return (
<EmptyState
heading="Your queue is empty."
action={{
content: 'Refresh queue',
... | import * as React from 'react';
import { Button } from '@shopify/polaris';
import { NonIdealState } from '@blueprintjs/core';
export interface Handlers {
readonly onRefresh: () => void;
}
const EmptyQueue = ({ onRefresh }: Handlers) => {
return (
// <EmptyState
// heading="Your queue is empty... | Switch QueueEmptyState with Blueprint non-ideal-state | Switch QueueEmptyState with Blueprint non-ideal-state
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -1,22 +1,33 @@
import * as React from 'react';
-import { EmptyState } from '@shopify/polaris';
+import { Button } from '@shopify/polaris';
+import { NonIdealState } from '@blueprintjs/core';
export interface Handlers {
- onRefresh: () => void;
+ readonly onRefresh: () => void;
}
const EmptyQueue ... |
f0939f15a7c9939095a8a87c5000df6acc63676e | app.ts | app.ts | /**
* Copyright (c) 2015, Fullstack.io
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Component, EventEmitter } from '@angular/core';
import {bootstrap} from '@angular/platform-browser-dynamic';
impor... | /**
* Copyright (c) 2015, Fullstack.io
* All rights reserved.
*
* This source code is licensed under the license found in the
* LICENSE file in the root directory of this source tree.
*/
import { Component, EventEmitter } from '@angular/core';
import {bootstrap} from '@angular/platform-browser-dynamic';
impor... | Use FormBuilder instead of ngForm | Use FormBuilder instead of ngForm
| TypeScript | mit | etrivinos/ng-book2-forms,etrivinos/ng-book2-forms,etrivinos/ng-book2-forms | ---
+++
@@ -9,7 +9,7 @@
import { Component, EventEmitter } from '@angular/core';
import {bootstrap} from '@angular/platform-browser-dynamic';
-import { FORM_DIRECTIVES } from '@angular/common';
+import { FORM_DIRECTIVES, FormBuilder, ControlGroup, Validators } from '@angular/common';
/**
* @FormApp: the top-... |
071c4cddaa23fad6ea13e2deba121dc2a6e3cbae | src/app/infrastructure/dom.factory.ts | src/app/infrastructure/dom.factory.ts | import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribut... | import { Dom } from "./dom";
import { Component } from "./component";
export class DomFactory {
static createElement(dom: Dom): HTMLElement {
const element = document.createElement(dom.tag);
if (dom.attributes) {
dom.attributes.forEach(attribute => {
element.setAttribut... | Add a convention to component tag name | Add a convention to component tag name
| TypeScript | mit | Vtek/frameworkless,Vtek/frameworkless,Vtek/frameworkless | ---
+++
@@ -14,7 +14,7 @@
if (dom.childs) {
dom.childs.forEach(child => {
if (typeof child === 'string') {
- element.innerText = child as string;
+ element.innerText = child;
}
else {
el... |
d4cd5fdeb63310ef7b72fe0c643644caa234e18c | identity-login.ts | identity-login.ts | import ko = require("knockout");
import services = require('services/services');
import authentication = require('./authentication');
import * as Folke from '../folke-core/folke';
import * as ServiceHelpers from "../folke-ko-service-helpers/folke-ko-service-helpers"
export class IdentityLoginViewModel {
form = new... | import ko = require("knockout");
import services = require('services/services');
import authentication = require('./authentication');
import * as Folke from '../folke-core/folke';
import * as ServiceHelpers from "../folke-ko-service-helpers/folke-ko-service-helpers"
export class IdentityLoginViewModel {
form = new... | Fix after change in Folke.Identity.Server | Fix after change in Folke.Identity.Server
| TypeScript | mit | folkelib/folke-identity | ---
+++
@@ -6,7 +6,7 @@
export class IdentityLoginViewModel {
form = new services.LoginView();
- providers = ko.observableArray<string>();
+ providers = ko.observableArray<services.AuthenticationDescription>();
loading = services.loading;
constructor(public parameters: Folke.Parameters<a... |
b9af3b398b44e189db5b512f769f5a4644019659 | src/core/log.ts | src/core/log.ts | import { createLogger, format, transports } from "winston";
const alignedWithColorsAndTime = format.combine(
format.colorize(),
format.timestamp(),
format.prettyPrint(),
format.align(),
format.printf((info) => {
const { timestamp, level, message, ...args } = info;
const ts = String... | import { createLogger, format, transports } from "winston";
import { Config } from "~/core/config";
const alignedWithColorsAndTime = format.combine(
format.colorize(),
format.timestamp(),
format.prettyPrint(),
format.align(),
format.printf((info) => {
const { timestamp, level, message, ...a... | Fix the silent config to work | Fix the silent config to work
| TypeScript | mit | JacobFischer/Cerveau,siggame/Cerveau,JacobFischer/Cerveau,siggame/Cerveau | ---
+++
@@ -1,4 +1,5 @@
import { createLogger, format, transports } from "winston";
+import { Config } from "~/core/config";
const alignedWithColorsAndTime = format.combine(
format.colorize(),
@@ -21,9 +22,10 @@
export const logger = createLogger({
level: "debug",
transports: [
- // colorize th... |
e4f2414a3978ead5f66ae664edd008e2549accea | src/app/actor/actor.component.spec.ts | src/app/actor/actor.component.spec.ts | import { inject } from '@angular/core/testing';
import { TestComponentBuilder } from '@angular/core/testing/test_component_builder';
import { ActorComponent } from './actor.component';
describe('Component: ActorComponent', () => {
let tcb: TestComponentBuilder;
beforeEach(done => {
inject([TestComponentBuild... | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActorComponent } from './actor.component';
describe('Component: ActorComponent', () => {
let fixture: ComponentFixture<ActorComponent>;
beforeEach(done => {
TestBed.configureTestingModule({
declarations: [ActorComponent],
... | Switch to using RC5 TestBed | Switch to using RC5 TestBed
| TypeScript | isc | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | ---
+++
@@ -1,33 +1,33 @@
-import { inject } from '@angular/core/testing';
-import { TestComponentBuilder } from '@angular/core/testing/test_component_builder';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ActorComponent } from './actor.component';
describe('Component: ActorCompo... |
d75aa52ad2753b253f63ab9d44f1f9556fedd055 | src/app/movie/movie.component.spec.ts | src/app/movie/movie.component.spec.ts | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { Observable } from 'rxjs/Rx';
import { MovieComponent } from './movie.component';
describe('Component: Movie', () => {
let fixture: ComponentFixture<MovieComponent>;
let mockActorService: any;
beforeEach(done => {
mockActorService ... | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { MovieComponent } from './movie.component';
describe('Component: Movie', () => {
let fixture: ComponentFixture<MovieComponent>;
beforeEach(done => {
TestBed.configureTestingModule({ declarations: [MovieComponent] });
TestBed.comp... | Correct typo in test description and remove dead code. | Correct typo in test description and remove dead code.
| TypeScript | isc | textbook/known-for-web,textbook/known-for-web,textbook/known-for-web | ---
+++
@@ -1,17 +1,11 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
-
-import { Observable } from 'rxjs/Rx';
import { MovieComponent } from './movie.component';
describe('Component: Movie', () => {
let fixture: ComponentFixture<MovieComponent>;
- let mockActorService: any;
bef... |
50860b1b528686d0c3e10cb5e0a44cedbed47c72 | scripts/slack/SlackWebAPI.ts | scripts/slack/SlackWebAPI.ts | import { injectable, inject } from "inversify";
import { ISlackWebAPI } from "./ISlackWebAPI";
import { PostMessageRequest, SlackConfig, SlackWebAPIResponse } from "./Types";
import { IHttpClient } from "../core/http/IHttpClient";
/***
* The Slack Web API is documented on https://api.slack.com/web
*/
@injectable()
... | import { injectable, inject } from "inversify";
import { ISlackWebAPI } from "./ISlackWebAPI";
import { PostMessageRequest, SlackConfig, SlackWebAPIResponse } from "./Types";
import { IHttpClient } from "../core/http/IHttpClient";
/***
* The Slack Web API is documented on https://api.slack.com/web
*/
@injectable()
... | Add defaults to message attachments | Add defaults to message attachments
| TypeScript | apache-2.0 | zmoog/dickbott | ---
+++
@@ -24,10 +24,11 @@
token: this.slackConfig.botUserOAuthAccessToken,
channel: message.channel || this.slackConfig.defaultChannel,
text: message.text,
- attachments: JSON.stringify(message.attachments),
+ attachments: JSON.stringi... |
4373d35bd184fba0af7069b2f230fa6a092f7803 | src/schema/Member.ts | src/schema/Member.ts | // This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
import {Namespace} from './Namespace';
import {Type} from './Type';
export class Member {
constructor(name: string) {
this.surrogateKey = Member.nextKey++;
this.name = name;
}
name: string;
namespa... | // This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
import * as cxml from 'cxml';
import {Namespace} from './Namespace';
import {Type} from './Type';
export class Member extends cxml.MemberBase<Member, Namespace, cxml.ItemBase<Member>> {
constructor(name: ... | Use member base class from cxml. | Use member base class from cxml.
| TypeScript | mit | charto/cxsd,charto/fast-xml,charto/fast-xml,charto/cxsd | ---
+++
@@ -1,17 +1,16 @@
// This file is part of cxsd, copyright (c) 2016 BusFaster Ltd.
// Released under the MIT license, see LICENSE.
+
+import * as cxml from 'cxml';
import {Namespace} from './Namespace';
import {Type} from './Type';
-export class Member {
+export class Member extends cxml.MemberBase<Mem... |
e9d7a91d17ba13dda7b6b42ea8f1ff7fc8beb2ec | e2e/app.e2e-spec.ts | e2e/app.e2e-spec.ts | import { Ng2CiAppPage } from './app.po';
describe('ng2-ci-app App', function () {
let page: Ng2CiAppPage;
beforeEach(() => {
page = new Ng2CiAppPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('NG Frie... | import { Ng2CiAppPage } from './app.po';
describe('ng2-ci-app App', function () {
let page: Ng2CiAppPage;
beforeEach(() => {
page = new Ng2CiAppPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('NG Frie... | Fix tests to display 9 friends | test(e2e): Fix tests to display 9 friends
Fix tests to display 9 friends
| TypeScript | mit | Elecash/ng2-ci-app,Elecash/ng2-ci-app,Elecash/ng2-ci-app,Elecash/ng2-ci-app | ---
+++
@@ -14,6 +14,6 @@
it('should display some ng friends', () => {
page.navigateTo();
- expect(page.getFriends()).toEqual(8);
+ expect(page.getFriends()).toEqual(9);
});
}); |
b5fd559ca49854f9a12032d4968b6c642da38a30 | applications/calendar/src/app/components/events/PopoverContainer.tsx | applications/calendar/src/app/components/events/PopoverContainer.tsx | import React, { useRef, Ref, forwardRef } from 'react';
import { useCombinedRefs, useFocusTrap } from 'react-components';
interface Props extends React.HTMLAttributes<HTMLDivElement> {
isOpen?: boolean;
}
const PopoverContainer = ({ children, isOpen = true, ...rest }: Props, ref: Ref<HTMLDivElement>) => {
con... | import React, { useRef, Ref, forwardRef } from 'react';
import { useCombinedRefs, useFocusTrap, classnames } from 'react-components';
interface Props extends React.HTMLAttributes<HTMLDivElement> {
isOpen?: boolean;
}
const PopoverContainer = ({ children, className, isOpen = true, ...rest }: Props, ref: Ref<HTMLDi... | Disable outline on popover focus trap | Disable outline on popover focus trap
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,17 +1,17 @@
import React, { useRef, Ref, forwardRef } from 'react';
-import { useCombinedRefs, useFocusTrap } from 'react-components';
+import { useCombinedRefs, useFocusTrap, classnames } from 'react-components';
interface Props extends React.HTMLAttributes<HTMLDivElement> {
isOpen?: boolean;
... |
db7270a0b0b91624449e50b31cde9261d05938b8 | app/_config/config.ts | app/_config/config.ts | /**
* Created by adam on 18/12/2016.
*/
export const REMOTE_URL = 'http://next.obudget.org/search';
export const LOCAL_URL = 'http://localhost:5000/search';
export const URL = REMOTE_URL;
// export const URL = LOCAL_URL;
export let Colors = {
bgColor: '#ccc'
};
| /**
* Created by adam on 18/12/2016.
*/
export const REMOTE_URL = 'https://next.obudget.org/search';
export const LOCAL_URL = 'http://localhost:5000/search';
export const URL = REMOTE_URL;
// export const URL = LOCAL_URL;
export let Colors = {
bgColor: '#ccc'
};
| Use https version of search api | Use https version of search api
| TypeScript | mit | aviklai/budgetkey-app-search,aviklai/budgetkey-app-search,aviklai/budgetkey-app-search | ---
+++
@@ -1,7 +1,7 @@
/**
* Created by adam on 18/12/2016.
*/
-export const REMOTE_URL = 'http://next.obudget.org/search';
+export const REMOTE_URL = 'https://next.obudget.org/search';
export const LOCAL_URL = 'http://localhost:5000/search';
export const URL = REMOTE_URL;
// export const URL = LOCAL_URL; |
dd73ad6a96e848e10cd94c2ad39008b783271e70 | typings/globals.d.ts | typings/globals.d.ts | declare var sinon: Sinon.SinonStatic;
import * as moment from "moment";
declare module "moment" {
export type MomentFormatSpecification = string;
}
export = moment;
| import { SinonStatic } from 'sinon';
declare global {
const sinon: SinonStatic;
}
import * as moment from "moment";
declare module "moment" {
export type MomentFormatSpecification = string;
}
export = moment;
| Declare sinon as a global | Declare sinon as a global
The latest sinon types don't have sinon as a global anymore, so we have to provide a shim for that.
| TypeScript | mit | RenovoSolutions/TypeScript-Angular-Utilities,RenovoSolutions/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities,SamGraber/TypeScript-Angular-Utilities | ---
+++
@@ -1,4 +1,9 @@
-declare var sinon: Sinon.SinonStatic;
+import { SinonStatic } from 'sinon';
+
+declare global {
+ const sinon: SinonStatic;
+}
+
import * as moment from "moment";
declare module "moment" { |
8b6345defe0eed52987b70f9672f2e7712fab051 | src/Decorators.ts | src/Decorators.ts | import _ = require("lodash");
export function memoize(resolver: any) {
return (target: any, name: string, descriptor: PropertyDescriptor) => {
descriptor.value = _.memoize(descriptor.value, resolver);
return descriptor;
}
}
| import _ = require("lodash");
export function memoize(resolver = (...args: any[]) => args) {
return (target: any, name: string, descriptor: PropertyDescriptor) => {
descriptor.value = _.memoize(descriptor.value, resolver);
return descriptor;
}
}
| Add a default value for memoize. | Add a default value for memoize.
| TypeScript | mit | Young55555/black-screen,j-allard/black-screen,smaty1/black-screen,w9jds/black-screen,cyrixhero/black-screen,drew-gross/black-screen,drew-gross/black-screen,kingland/black-screen,cyrixhero/black-screen,smaty1/black-screen,gastrodia/black-screen,habibmasuro/black-screen,rob3ns/black-screen,jbhannah/black-screen,toxic88/b... | ---
+++
@@ -1,6 +1,6 @@
import _ = require("lodash");
-export function memoize(resolver: any) {
+export function memoize(resolver = (...args: any[]) => args) {
return (target: any, name: string, descriptor: PropertyDescriptor) => {
descriptor.value = _.memoize(descriptor.value, resolver);
|
adde8c9c53a4b90c89a5ab41be64a389e9c5a57e | client.src/index.tsx | client.src/index.tsx | import {h, render} from 'preact';
| import {h, render} from 'preact';
const TREE_DATA = [
{
name: 'Services',
icon: '#folder',
entries: [
{
key: 1482949340975,
expiration: 1483686907461,
history: [
1482949340970,
],
name: 'Google',
description: 'Big brother',
url: 'https://google.com/',
icon: 'https://www.g... | Add static mock of tree data | Add static mock of tree data
| TypeScript | mit | Avol-V/anykey,Avol-V/anykey,Avol-V/anykey | ---
+++
@@ -1 +1,44 @@
import {h, render} from 'preact';
+
+const TREE_DATA = [
+ {
+ name: 'Services',
+ icon: '#folder',
+ entries: [
+ {
+ key: 1482949340975,
+ expiration: 1483686907461,
+ history: [
+ 1482949340970,
+ ],
+ name: 'Google',
+ description: 'Big brother',
+ url: 'https... |
6ce0c0b8332974ff868684c951e2ac1207abde41 | test/test.ts | test/test.ts | import 'reflect-metadata';
import test from 'ava';
import { command, option } from '../dist';
// interface Global {
// Reflect: any;
// }
const g = <any>global;
const Reflect = g.Reflect;
test((t) => {
debugger;
class MyCommand {
@command({ argv: ['--test', 'test-value'] })
run(@option({ name: 'test' ... | import 'reflect-metadata';
import test from 'ava';
import { command, option } from '../dist';
// https://github.com/avajs/ava/issues/1089
const g = <any>global;
const Reflect = g.Reflect;
test((t) => {
debugger;
class MyCommand {
@command({ argv: ['--test', 'test-value'] })
run(@option({ name: 'test' }) ... | Add link to issue about ava and overriding globals | Add link to issue about ava and overriding globals
| TypeScript | mit | dwieeb/minimist-decorators | ---
+++
@@ -3,10 +3,7 @@
import { command, option } from '../dist';
-// interface Global {
-// Reflect: any;
-// }
-
+// https://github.com/avajs/ava/issues/1089
const g = <any>global;
const Reflect = g.Reflect;
|
0ea4ffec7f3752cefc86b009248a5f7c16cc5725 | source/math_demo.ts | source/math_demo.ts | ///<reference path="./interfaces.d.ts" />
class MathDemo implements MathInterface{
public PI : number;
constructor() {
this.PI = 3.14159265359;
}
public pow(base: number, exponent: number) {
var result = base;
for(var i = 1; i < exponent; i++){
result = result * base;
}
... | ///<reference path="./interfaces.d.ts" />
class MathDemo implements MathInterface{
public PI : number;
constructor() {
this.PI = 3.14159265359;
}
public pow(base: number, exponent: number) {
var result = base;
for(var i = 1; i < exponent; i++){
result = result * base;
}
... | Fix for typo in method name | Fix for typo in method name
| TypeScript | mit | ChargerIIC/ts-book,ChargerIIC/ts-book,ChargerIIC/ts-book | ---
+++
@@ -15,7 +15,7 @@
return result;
}
- public powAsyncSlow(base: number, exponent: number, cb : (result : number) => void) {
+ public powAsync(base: number, exponent: number, cb : (result : number) => void) {
var delay = 45; //ms
setTimeout(() => {
var result = this.pow(base, expone... |
e504a7938cbc56e301b65667247432cd7d5202ab | src/utils/config.ts | src/utils/config.ts | export const PROJECT_NAME = 'typings'
export const CONFIG_FILE = `${PROJECT_NAME}.json`
export const TYPINGS_DIR = `${PROJECT_NAME}_typings`
export const DTS_MAIN_FILE = `${PROJECT_NAME}.main.d.ts`
export const DTS_BROWSER_FILE = `${PROJECT_NAME}.browser.d.ts`
| export const PROJECT_NAME = 'typings'
export const CONFIG_FILE = `${PROJECT_NAME}.json`
export const TYPINGS_DIR = PROJECT_NAME
export const DTS_MAIN_FILE = 'main.d.ts'
export const DTS_BROWSER_FILE = 'browser.d.ts'
| Fix `typings/` directory structure after rename | Fix `typings/` directory structure after rename | TypeScript | mit | typings/typings,typings/typings | ---
+++
@@ -1,5 +1,5 @@
export const PROJECT_NAME = 'typings'
export const CONFIG_FILE = `${PROJECT_NAME}.json`
-export const TYPINGS_DIR = `${PROJECT_NAME}_typings`
-export const DTS_MAIN_FILE = `${PROJECT_NAME}.main.d.ts`
-export const DTS_BROWSER_FILE = `${PROJECT_NAME}.browser.d.ts`
+export const TYPINGS_DIR = ... |
3f0814c692cbed2864365df591c1e9b2bd5c1ddc | ui/src/api/image.ts | ui/src/api/image.ts | export const fetchImage = async (project: string,
id: string,
maxWidth: number,
maxHeight: number,
token: string): Promise<string> => {
const imageUrl = getImageUrl(project, `${id}.jp... | export const fetchImage = async (project: string,
id: string,
maxWidth: number,
maxHeight: number,
token: string): Promise<string> => {
const imageUrl = getImageUrl(project, `${id}.jp... | Add empty line at eof | Add empty line at eof
| TypeScript | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | |
d68f737abf00b490ba463bb87f5ded5ef091b42a | angular-dropdown-control.directive.ts | angular-dropdown-control.directive.ts | import {
Directive,
ElementRef,
Inject,
forwardRef,
Input,
Host,
HostListener
} from '@angular/core';
import { AngularDropdownDirective }
from './angular-dropdown.directive';
@Directive({
selector: '[ng-dropdown-control],[ngDropdownControl]',
host: {
'[attr.aria-haspopup]': 'true',
'[attr.... | import {
Directive,
ElementRef,
Inject,
forwardRef,
Input,
Host,
HostListener
} from '@angular/core';
import { AngularDropdownDirective }
from './angular-dropdown.directive';
@Directive({
selector: '[ng-dropdown-control],[ngDropdownControl]',
host: {
'[attr.aria-haspopup]': 'true',
'[attr.... | Add aria-expanded attribute binding to control | Add aria-expanded attribute binding to control
| TypeScript | mit | topaxi/angular-dropdown,topaxi/angular-dropdown,topaxi/angular-dropdown | ---
+++
@@ -16,6 +16,7 @@
host: {
'[attr.aria-haspopup]': 'true',
'[attr.aria-controls]': 'dropdown.id',
+ '[attr.aria-expanded]': 'dropdown.isOpen',
'[class.ng-dropdown-control]': 'true',
'[class.active]': 'dropdown.isOpen'
} |
690d1e89780022ca84b80890eb360afd9562da4a | lib/utils.ts | lib/utils.ts | /**
* Slack upload logic and utilites
*/
'use strict'
import * as fs from 'fs'
import { exec } from 'child_process'
import * as request from 'request-promise'
import { SLACK_TOKEN, SLACK_CHANNEL } from './config'
/**
* Uploads the zip file to Slack
* @param {string} file Path of file to upload
* @param {string}... | /**
* Slack upload logic and utilites
*/
'use strict'
import * as fs from 'fs'
import { exec } from 'child_process'
import * as request from 'request-promise'
import { SLACK_TOKEN, SLACK_CHANNEL } from './config'
/**
* Uploads the zip file to Slack
* @param {string} file Path of file to upload
* @param {string}... | Resolve if error is null | Resolve if error is null
| TypeScript | apache-2.0 | shantanuraj/slack-android-uploader,shantanuraj/slack-android-uploader | ---
+++
@@ -16,7 +16,7 @@
* @param {string} tag Optional tag to upload
*/
export const Slack = (file: string, type: string, tag?: string) => {
- console.log('Uploading zip to Slack')
+ console.log('[exec] Uploading zip to Slack')
return request.post({
url: 'https://slack.com/api/files.upload',
@@ -4... |
ad76b0d9b3bc9fd17d83b9e1e230a299980252f7 | app/shared/no.sanitization.service.ts | app/shared/no.sanitization.service.ts | import { Injectable, provide } from '@angular/core';
import { DomSanitizationService, SecurityContext } from '@angular/platform-browser';
@Injectable()
export class NoSanitizationService {
sanitize(ctx: SecurityContext, value: any): string {
return value;
}
}
export const NO_SANITIZATION_PROVIDERS: an... | import { Injectable } from '@angular/core';
import { DomSanitizationService, SecurityContext } from '@angular/platform-browser';
@Injectable()
export class NoSanitizationService {
sanitize(ctx: SecurityContext, value: any): string {
return value;
}
}
export const NO_SANITIZATION_PROVIDERS: any[] = [
... | Update NoSanitizationService to not use deprecated apis | Update NoSanitizationService to not use deprecated apis
| TypeScript | mit | zoehneto/tumblr-reader,zoehneto/tumblr-reader,zoehneto/tumblr-reader | ---
+++
@@ -1,4 +1,4 @@
-import { Injectable, provide } from '@angular/core';
+import { Injectable } from '@angular/core';
import { DomSanitizationService, SecurityContext } from '@angular/platform-browser';
@Injectable()
@@ -9,5 +9,5 @@
}
export const NO_SANITIZATION_PROVIDERS: any[] = [
- provide(DomSani... |
ae7273d673e3da00c1b07927b05ca225a652bc54 | packages/node-sass-magic-importer/src/functions/parse-node-filters.ts | packages/node-sass-magic-importer/src/functions/parse-node-filters.ts | import { IFilterParser } from '../interfaces/IFilterParser';
export function parseNodeFiltersFactory(): IFilterParser {
return (url: string) => {
const nodeFiltersMatch = url
.replace(/{.*?\/.*?\/.*?}/, '')
.match(/\[([\s\S]*)\]/);
if (!nodeFiltersMatch) {
return [];
}
return node... | import { IFilterParser } from '../interfaces/IFilterParser';
export function parseNodeFiltersFactory(): IFilterParser {
return (url: string) => {
const nodeFiltersMatch = url
.replace(/{.*?\/.*?\/.*?}/, ``)
.match(/\[([\s\S]*)\]/);
if (!nodeFiltersMatch) {
return [];
}
return node... | Use backticks because coding style | Use backticks because coding style
| TypeScript | mit | maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer,maoberlehner/node-sass-magic-importer | ---
+++
@@ -3,7 +3,7 @@
export function parseNodeFiltersFactory(): IFilterParser {
return (url: string) => {
const nodeFiltersMatch = url
- .replace(/{.*?\/.*?\/.*?}/, '')
+ .replace(/{.*?\/.*?\/.*?}/, ``)
.match(/\[([\s\S]*)\]/);
if (!nodeFiltersMatch) { |
dfbf27e2958dd7770996cc4e75db9162484a0e48 | NavigationReactNative/src/CoordinatorLayout.tsx | NavigationReactNative/src/CoordinatorLayout.tsx | import React from 'react'
import { requireNativeComponent, Platform } from 'react-native';
import NavigationBar from './NavigationBar';
import SearchBar from './SearchBar';
class CoordinatorLayout extends React.Component<any, any> {
private ref: React.RefObject<any>;
constructor(props) {
super(props);
... | import React from 'react'
import { requireNativeComponent, Platform } from 'react-native';
import NavigationBar from './NavigationBar';
import SearchBar from './SearchBar';
const CoordinatorLayout = ({overlap, children}) => {
var {clonedChildren, searchBar} = React.Children.toArray(children)
.reduce((val, ... | Revert "Added ref to coodinator layout native component" | Revert "Added ref to coodinator layout native component"
This reverts commit 56b709278641222adafa9459b4a27a23d56817d9.
| TypeScript | apache-2.0 | grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation,grahammendick/navigation | ---
+++
@@ -3,40 +3,24 @@
import NavigationBar from './NavigationBar';
import SearchBar from './SearchBar';
-class CoordinatorLayout extends React.Component<any, any> {
- private ref: React.RefObject<any>;
- constructor(props) {
- super(props);
- this.ref = React.createRef<any>();
- }
- ... |
5f45aebad3d9143ee6d340394c81a76bee8c3bb5 | client/download/download-dialog.tsx | client/download/download-dialog.tsx | import React from 'react'
import styled from 'styled-components'
import Dialog from '../material/dialog'
import Download from './download'
const StyledDialog = styled(Dialog)`
max-width: 480px;
`
interface DownloadDialogProps {
dialogRef: React.Ref<any>
onCancel?: () => void
}
export default function DownloadD... | import React from 'react'
import styled from 'styled-components'
import Dialog from '../material/dialog'
import Download from './download'
const StyledDialog = styled(Dialog)`
max-width: 480px;
`
interface DownloadDialogProps {
dialogRef: React.Ref<any>
onCancel?: () => void
}
export default function DownloadD... | Fix DownloadDialog not passing a required prop. | Fix DownloadDialog not passing a required prop.
| TypeScript | mit | ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery,ShieldBattery/ShieldBattery | ---
+++
@@ -14,7 +14,11 @@
export default function DownloadDialog(props: DownloadDialogProps) {
return (
- <StyledDialog onCancel={props.onCancel} showCloseButton={true} dialogRef={props.dialogRef}>
+ <StyledDialog
+ title=''
+ onCancel={props.onCancel}
+ showCloseButton={true}
+ dialo... |
a195bb2c2d1fd924c62d6d3e78d9bae628bc3fd5 | src/SyntaxNodes/DescriptionListNode.ts | src/SyntaxNodes/DescriptionListNode.ts | import { OutlineSyntaxNode } from './OutlineSyntaxNode'
import { InlineSyntaxNode } from './InlineSyntaxNode'
import { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'
import { OutlineSyntaxNodeContainer } from './OutlineSyntaxNodeContainer'
export class DescriptionListNode implements OutlineSyntaxNode ... | import { OutlineSyntaxNode } from './OutlineSyntaxNode'
import { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'
import { OutlineSyntaxNodeContainer } from './OutlineSyntaxNodeContainer'
export class DescriptionListNode implements OutlineSyntaxNode {
constructor(public items: DescriptionListNode.Item... | Make description list term extend inline container | Make description list term extend inline container
| TypeScript | mit | start/up,start/up | ---
+++
@@ -1,5 +1,4 @@
import { OutlineSyntaxNode } from './OutlineSyntaxNode'
-import { InlineSyntaxNode } from './InlineSyntaxNode'
import { InlineSyntaxNodeContainer } from './InlineSyntaxNodeContainer'
import { OutlineSyntaxNodeContainer } from './OutlineSyntaxNodeContainer'
@@ -20,9 +19,7 @@
export ... |
3e8ecaadc487a8c1438b40c73cb4e4b2303a3609 | src/index.ts | src/index.ts | import { Observable } from 'rxjs';
import { FilterOptions } from './collection';
export { Database } from './database';
export { Collection } from './collection';
export { Query } from './query';
/**
* IDatabase
* IDatabase contains a set of collections which stores documents.
*/
export interface IDatabase {
c... | import { Observable } from 'rxjs';
import { FilterOptions } from './collection';
export { Database } from './database';
export { Collection } from './collection';
export { Query } from './query';
/**
* IDatabase
* IDatabase contains a set of collections which stores documents.
*/
export interface IDatabase {
c... | Make query options optional in ICollection interface | Make query options optional in ICollection interface
| TypeScript | mit | Cinergix/rxdata,Cinergix/rxdata | ---
+++
@@ -19,7 +19,7 @@
* using collection methods. It uses a IPersistor to store data.
*/
export interface ICollection {
- find( filter: any, options: FilterOptions ): IQuery;
+ find( filter: any, options?: FilterOptions ): IQuery;
insert( doc: any ): Observable<any>;
update( filter: any, chan... |
9ba350be219852397194600f803e368798c72a1b | src/index.ts | src/index.ts | import {
ComponentDoc,
parse,
PropItem,
PropItemType,
Props,
withCustomConfig,
withDefaultConfig
} from './parser';
export {
parse,
withDefaultConfig,
withCustomConfig,
ComponentDoc,
Props,
PropItem,
PropItemType
};
| import {
ComponentDoc,
FileParser,
parse,
ParserOptions,
PropItem,
PropItemType,
Props,
withCompilerOptions,
withCustomConfig,
withDefaultConfig
} from './parser';
export {
parse,
withCompilerOptions,
withDefaultConfig,
withCustomConfig,
ComponentDoc,
FileParser,
ParserOptions,
Prop... | Add additional exports to module entry point | Add additional exports to module entry point
Added a few additional exports to the module's index to support use with
react-docgen-typescript-loader. This allows this package to more easily
be used as a peer dependency.
| TypeScript | mit | pvasek/react-docgen-typescript,styleguidist/react-docgen-typescript | ---
+++
@@ -1,18 +1,24 @@
import {
ComponentDoc,
+ FileParser,
parse,
+ ParserOptions,
PropItem,
PropItemType,
Props,
+ withCompilerOptions,
withCustomConfig,
withDefaultConfig
} from './parser';
export {
parse,
+ withCompilerOptions,
withDefaultConfig,
withCustomConfig,
Comp... |
ab4ade51a9db79776539be79fd31bcac85077057 | src/store.ts | src/store.ts | import { createStore, compose, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { autoRehydrate, persistStore } from 'redux-persist';
import { rootReducer } from './reducers';
import rootSaga from './sagas';
import { config } from './config';
const sagaMiddleware = createSag... | import { createStore, compose, applyMiddleware } from 'redux';
import createSagaMiddleware from 'redux-saga';
import { autoRehydrate, persistStore } from 'redux-persist';
import { rootReducer } from './reducers';
import rootSaga from './sagas';
import { config } from './config';
const sagaMiddleware = createSag... | Remove unnecessary type argument to createStore. | Remove unnecessary type argument to createStore.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -7,7 +7,7 @@
const sagaMiddleware = createSagaMiddleware();
-const store = createStore<any>(
+const store = createStore(
rootReducer,
compose(applyMiddleware(sagaMiddleware), autoRehydrate(), config.devtools)
); |
9507092f8f31fe45094eba8cfc34e3e3a35dcae4 | e2e/common/common.ts | e2e/common/common.ts | const data = require('../data/users.json').users;
import { ElementFinder } from 'protractor';
export class User {
alias: string;
description: string;
username: string;
password: string;
constructor(alias: string, description: string) {
this.alias = alias;
this.description = description;
const ... | import { ElementFinder } from 'protractor';
export class User {
alias: string;
description: string;
username: string;
password: string;
constructor(alias: string, description: string) {
this.alias = alias;
this.description = description;
const envUsername = process.env[`IPAAS_${alias.toUpperCa... | Fix credentials loading from json | Fix credentials loading from json
| TypeScript | apache-2.0 | kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client,kahboom/ipaas-client | ---
+++
@@ -1,4 +1,3 @@
-const data = require('../data/users.json').users;
import { ElementFinder } from 'protractor';
export class User {
@@ -16,6 +15,7 @@
const envPassword = process.env[`IPAAS_${alias.toUpperCase()}_PASSWORD`] || null;
if (envUsername === null || envPassword === null) {
+ cons... |
ded00a0b4b3d5487d1b8b11344a9a4d723d78710 | app/common/angular-utility.ts | app/common/angular-utility.ts | /**
* @author Thomas Kleinke
*/
export module AngularUtility {
export async function refresh() {
await new Promise(resolve => setTimeout(async () => resolve(), 1));
}
} | /**
* @author Thomas Kleinke
*/
export module AngularUtility {
export async function refresh() {
await new Promise(resolve => setTimeout(async () => resolve(), 100));
}
} | Increase timeout value in AngularUtility.refresh | Increase timeout value in AngularUtility.refresh
| TypeScript | apache-2.0 | codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client,codarchlab/idai-field-client | ---
+++
@@ -5,6 +5,6 @@
export async function refresh() {
- await new Promise(resolve => setTimeout(async () => resolve(), 1));
+ await new Promise(resolve => setTimeout(async () => resolve(), 100));
}
} |
856aa57f59b7439ff1a5bc15b8e07abdaa90cc7f | index.d.ts | index.d.ts | export = scrollama;
declare function scrollama(): scrollama.ScrollamaInstance;
declare namespace scrollama {
export type DecimalType = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
export type ScrollamaOptions = {
step: HTMLElement | string;
progress?: boolean;
offset?: DecimalType;
... | export = scrollama;
declare function scrollama(): scrollama.ScrollamaInstance;
declare namespace scrollama {
export type DecimalType = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
export type ScrollamaOptions = {
step: HTMLElement[] | string;
progress?: boolean;
offset?: DecimalType;
... | Change step type to array of elements | Change step type to array of elements
As per the documentation: "`step` (string): Selector (or array of elements)" | TypeScript | mit | russellgoldenberg/scrollama,russellgoldenberg/scrollama | ---
+++
@@ -6,7 +6,7 @@
export type DecimalType = 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
export type ScrollamaOptions = {
- step: HTMLElement | string;
+ step: HTMLElement[] | string;
progress?: boolean;
offset?: DecimalType;
threshold?: 1 | 2 | 3 | 4; |
84aaf5f8d3e1e954f3286c36241c4dad81170017 | src/collect/structures/array-from.ts | src/collect/structures/array-from.ts | export function arrayFrom(attrs: NamedNodeMap): readonly Attr[];
export function arrayFrom<N extends Node>(nodeListOf: NodeListOf<N>): readonly N[];
export function arrayFrom(nodeListOf: HTMLCollection): readonly Element[];
export function arrayFrom(
collection: NodeListOf<Node>|HTMLCollection|NamedNodeMap,
): Read... | export function arrayFrom(attrs: NamedNodeMap): readonly Attr[];
export function arrayFrom<N extends Node>(nodeListOf: NodeListOf<N>): readonly N[];
export function arrayFrom(filelist: FileList): readonly File[];
export function arrayFrom(nodeListOf: HTMLCollection): readonly Element[];
export function arrayFrom(
c... | Make arrayFrom support file list | Make arrayFrom support file list
| TypeScript | mit | garysoed/gs-tools,garysoed/gs-tools,garysoed/gs-tools,garysoed/gs-tools | ---
+++
@@ -1,10 +1,11 @@
export function arrayFrom(attrs: NamedNodeMap): readonly Attr[];
export function arrayFrom<N extends Node>(nodeListOf: NodeListOf<N>): readonly N[];
+export function arrayFrom(filelist: FileList): readonly File[];
export function arrayFrom(nodeListOf: HTMLCollection): readonly Element[];
... |
b53b76bd3ab0e5e0c7fe2f4be1bd54ff92eb0860 | src/parent-symbol.ts | src/parent-symbol.ts | const parentSymbol: symbol = Symbol('parent');
export default parentSymbol;
| declare var global: any;
let root: any;
if (typeof self !== 'undefined') {
root = self;
} else if (typeof window !== 'undefined') {
root = window;
} else if (typeof global !== 'undefined') {
root = global;
} else {
root = Function('return this')();
}
const Symbol = root.Symbol;
let parentSymbol: symbol;
if (... | Add a string-based fallback when Symbol is not available | Add a string-based fallback when Symbol is not available
Fixes issue #22
| TypeScript | mit | TylorS/snabbdom-selector | ---
+++
@@ -1,3 +1,23 @@
-const parentSymbol: symbol = Symbol('parent');
+declare var global: any;
+
+let root: any;
+if (typeof self !== 'undefined') {
+ root = self;
+} else if (typeof window !== 'undefined') {
+ root = window;
+} else if (typeof global !== 'undefined') {
+ root = global;
+} else {
+ root = Fun... |
490e4e1b2a27664e6609eaf6715896eb2caffd49 | frontend/map.component.ts | frontend/map.component.ts | import { Component, OnInit } from "@angular/core";
@Component({
selector: "map-app",
templateUrl: "map.component.html"
})
export class MapComponent implements OnInit {
public tweets: Array<Object>;
constructor() {
this.tweets = [
{
"author": "Foo",
"text... | import { Component, OnInit } from "@angular/core";
@Component({
selector: "map-app",
templateUrl: "map.component.html"
})
export class MapComponent implements OnInit {
public tweets: Array<Object>;
constructor() {
this.tweets = [
{
"author": "Foo",
"text... | Remove url from Google Maps marker. | Remove url from Google Maps marker.
| TypeScript | mit | Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher,Strassengezwitscher/Strassengezwitscher | ---
+++
@@ -35,7 +35,6 @@
const marker = new google.maps.Marker({
position: latlng,
- url: "/",
animation: google.maps.Animation.DROP
});
|
56a4048571764fea35512d0bdae01a5ab19caed8 | src/third_party/tsetse/error_code.ts | src/third_party/tsetse/error_code.ts | /**
* Error codes for tsetse checks.
*
* Start with 21222 and increase linearly.
* The intent is for these codes to be fixed, so that tsetse users can
* search for them in user forums and other media.
*/
export enum ErrorCode {
CHECK_RETURN_VALUE = 21222,
EQUALS_NAN = 21223,
BAN_EXPECT_TRUTHY_PROMISE = 2122... | /**
* Error codes for tsetse checks.
*
* Start with 21222 and increase linearly.
* The intent is for these codes to be fixed, so that tsetse users can
* search for them in user forums and other media.
*/
export enum ErrorCode {
CHECK_RETURN_VALUE = 21222,
EQUALS_NAN = 21223,
BAN_EXPECT_TRUTHY_PROMISE = 2122... | Add rule which requires the user to cast the result of JSON.parse. | Add rule which requires the user to cast the result of JSON.parse.
PiperOrigin-RevId: 322620340
| TypeScript | apache-2.0 | google/tsec,google/tsec | ---
+++
@@ -15,4 +15,5 @@
CONFORMANCE_PATTERN = 21228,
BAN_MUTABLE_EXPORTS = 21229,
BAN_STRING_INITIALIZED_SETS = 21230,
+ MUST_TYPE_ASSERT_JSON_PARSE = 21231,
} |
ab0494f592cd5fbd4d960991278190020ab59b5b | src/utils/string.ts | src/utils/string.ts | /**
* Indicates if the given string ends with the given suffix
*
* @export
* @param {string} str
* @param {string} suffix
* @returns {boolean}
*/
export function strEndsWith(str: string, suffix: string): boolean {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
/**
* Replaces all occurrenc... | /**
* Indicates if the given string ends with the given suffix
*
* @export
* @param {string} str
* @param {string} suffix
* @returns {boolean}
*/
export function strEndsWith(str: string, suffix: string): boolean {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
}
/**
* Replaces all occurrenc... | Change strIsNullOrEmpty so that it works as a proper type-guard | Change strIsNullOrEmpty so that it works as a proper type-guard
| TypeScript | mit | jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout,jumpinjackie/mapguide-react-layout | ---
+++
@@ -35,7 +35,7 @@
* @param {(string | null | undefined)} str
* @returns {boolean}
*/
-export function strIsNullOrEmpty(str: string | null | undefined): boolean {
+export function strIsNullOrEmpty(str: string | null | undefined): str is null | undefined {
return null == str || "" === str;
}
|
aa6ecde922a6e0fec5f7a28d5911d8bc6dad289f | src/model/literature.ts | src/model/literature.ts | /**
* @author Thomas Kleinke
*/
export interface Literature {
quotation: string;
zenonId?: string;
}
export module Literature {
export function generateLabel(literature: Literature, getTranslation: (key: string) => string): string {
return literature.quotation + (literature.zenonId
... | /**
* @author Thomas Kleinke
*/
export interface Literature {
quotation: string;
zenonId?: string;
}
export module Literature {
export function generateLabel(literature: Literature, getTranslation: (key: string) => string): string {
return literature.quotation + (literature.zenonId
... | Add basic validation function for Literature | Add basic validation function for Literature
| TypeScript | apache-2.0 | dainst/idai-components-2,dainst/idai-components-2,dainst/idai-components-2 | ---
+++
@@ -18,4 +18,10 @@
+ ': ' + literature.zenonId + ')'
: '');
}
+
+
+ export function isValid(literature: Literature): boolean {
+
+ return literature.quotation !== undefined && literature.quotation.length > 0;
+ }
} |
5840bf64e92d291cc037830c56edc90a67f1f1a7 | test/test_runner.ts | test/test_runner.ts | import * as fs from "fs";
import { MultiReporter } from "./mocha_multi_reporter";
import testRunner = require("vscode/lib/testrunner");
const onExit = require("signal-exit"); // tslint:disable-line:no-var-requires
// Ensure we write coverage on exit.
declare const __coverage__: any;
onExit(() => {
// Unhandled except... | console.log("Starting test runner...");
import * as fs from "fs";
import { MultiReporter } from "./mocha_multi_reporter";
import testRunner = require("vscode/lib/testrunner");
const onExit = require("signal-exit"); // tslint:disable-line:no-var-requires
// Ensure we write coverage on exit.
declare const __coverage__:... | Add log at vert start of tests | Add log at vert start of tests
Travis Linux seems to be hanging; not clear if it's getting this far..
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -1,3 +1,5 @@
+console.log("Starting test runner...");
+
import * as fs from "fs";
import { MultiReporter } from "./mocha_multi_reporter";
import testRunner = require("vscode/lib/testrunner"); |
a6f1aca3eef9b3d7402126bf020e965b286c7405 | src/pages/item/index.ts | src/pages/item/index.ts | import { inject } from 'aurelia-framework';
import { Router } from 'aurelia-router';
import { HackerNewsApi } from '../../services/api';
@inject(Router, HackerNewsApi)
export class Item {
private readonly router: Router;
private readonly api: HackerNewsApi;
private id: number;
private item: any;
p... | import { inject } from 'aurelia-framework';
import { Router } from 'aurelia-router';
import { HackerNewsApi } from '../../services/api';
@inject(Router, HackerNewsApi)
export class Item {
id: number;
item: any;
comments: any[];
private readonly router: Router;
private readonly api: HackerNewsApi;
... | Correct visibility of variables in Item view-model | Correct visibility of variables in Item view-model
| TypeScript | isc | michaelbull/aurelia-hacker-news,michaelbull/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,MikeBull94/aurelia-hacker-news,michaelbull/aurelia-hacker-news | ---
+++
@@ -4,12 +4,12 @@
@inject(Router, HackerNewsApi)
export class Item {
+ id: number;
+ item: any;
+ comments: any[];
+
private readonly router: Router;
private readonly api: HackerNewsApi;
-
- private id: number;
- private item: any;
- private comments: any[];
constructor(... |
23733265bb7a7e082f7af90f87a7672c353f08e2 | modules/api/index.ts | modules/api/index.ts | import qs from 'query-string'
import {IS_PRODUCTION} from '@frogpond/constants'
let root: string
export function setApiRoot(url: string): void {
root = url
}
export const API = (path: string, query: unknown = null): string => {
if (!IS_PRODUCTION) {
if (!path.startsWith('/')) {
throw new Error('invalid path ... | import qs from 'query-string'
import {IS_PRODUCTION} from '@frogpond/constants'
let root: string
export function setApiRoot(url: string): void {
root = url
}
export const API = (path: string, query?: Record<string, any>): string => {
if (!IS_PRODUCTION) {
if (!path.startsWith('/')) {
throw new Error('invalid... | Fix API(string, Record<string, any>) signature | m/api: Fix API(string, Record<string, any>) signature
While the previous type was technically correct, this commit definitely
makes the types we expect more explicit. Something Record-y with string
keys _can_ be passed as the second parameter. If it's not passed, then
it'd be undefined, not null.
Signed-off-by: Kri... | TypeScript | agpl-3.0 | StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native,StoDevX/AAO-React-Native | ---
+++
@@ -8,7 +8,7 @@
root = url
}
-export const API = (path: string, query: unknown = null): string => {
+export const API = (path: string, query?: Record<string, any>): string => {
if (!IS_PRODUCTION) {
if (!path.startsWith('/')) {
throw new Error('invalid path requested from the api!') |
db7bd4efda0076eec0e27c0b5058063c269ed193 | addons/google-analytics/src/register.ts | addons/google-analytics/src/register.ts | import { window } from 'global';
import { addons } from '@storybook/addons';
import { STORY_CHANGED, STORY_ERRORED, STORY_MISSING } from '@storybook/core-events';
import ReactGA from 'react-ga';
addons.register('storybook/google-analytics', api => {
ReactGA.initialize(window.STORYBOOK_GA_ID);
api.on(STORY_CHANGE... | import { window } from 'global';
import { addons } from '@storybook/addons';
import { STORY_CHANGED, STORY_ERRORED, STORY_MISSING } from '@storybook/core-events';
import ReactGA from 'react-ga';
addons.register('storybook/google-analytics', api => {
ReactGA.initialize(window.STORYBOOK_GA_ID);
api.on(STORY_CHANGE... | Fix 'path is required in .pageview()' in GA addon | Fix 'path is required in .pageview()' in GA addon
See https://github.com/storybookjs/storybook/issues/6012 | TypeScript | mit | storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook | ---
+++
@@ -8,8 +8,8 @@
ReactGA.initialize(window.STORYBOOK_GA_ID);
api.on(STORY_CHANGED, () => {
- const { url } = api.getUrlState();
- ReactGA.pageview(url);
+ const { path } = api.getUrlState();
+ ReactGA.pageview(path);
});
api.on(STORY_ERRORED, ({ description }: { description: string })... |
b5fb2f105aef9f4887641cc9f55030f549df35de | src/shared/vscode/utils.ts | src/shared/vscode/utils.ts | import { commands, Uri } from "vscode";
import { forceWindowsDriveLetterToUppercase } from "../utils";
export function fsPath(uri: Uri | string) {
// tslint:disable-next-line:disallow-fspath
return forceWindowsDriveLetterToUppercase(uri instanceof Uri ? uri.fsPath : uri);
}
export function openInBrowser(url: string... | import { commands, ExtensionKind, extensions, Uri } from "vscode";
import { dartCodeExtensionIdentifier } from "../constants";
import { forceWindowsDriveLetterToUppercase } from "../utils";
const dartExtension = extensions.getExtension(dartCodeExtensionIdentifier);
// The extension kind is declared as Workspace, but V... | Add the ability to detect when running remotely | Add the ability to detect when running remotely
See #1738.
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -1,5 +1,11 @@
-import { commands, Uri } from "vscode";
+import { commands, ExtensionKind, extensions, Uri } from "vscode";
+import { dartCodeExtensionIdentifier } from "../constants";
import { forceWindowsDriveLetterToUppercase } from "../utils";
+
+const dartExtension = extensions.getExtension(dartCodeEx... |
665e692ab7ebd0db2969b3cac6ae97dac1306ea4 | app/src/services/http-json-service.ts | app/src/services/http-json-service.ts | export default class HttpJsonService {
private basePath: string;
constructor(basePath: string) {
this.basePath = basePath;
}
public get(url: string): Promise<any> {
return this.fetch("GET", url, null);
}
public post(url: string, body: any): Promise<any> {
return this.fetch("POST", url, body);... | export default class HttpJsonService {
private basePath: string;
constructor(basePath: string) {
this.basePath = basePath;
}
public get(url: string): Promise<any> {
return this.fetch("GET", url, null);
}
public post(url: string, body: any): Promise<any> {
return this.fetch("POST", url, body);... | Fix httpJsonService on 204 responses | Fix httpJsonService on 204 responses
| TypeScript | mit | DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website | ---
+++
@@ -46,6 +46,9 @@
}
private parseJson(response: any): Promise<any> {
+ if (response.status === 204) {
+ return Promise.resolve(null);
+ }
return response.json();
}
|
5ab28dbbeec853606367a7611acda37e9a078e32 | src/parser/util.ts | src/parser/util.ts | import * as path from 'path';
declare var atom: any;
function parseFilepath(s: string): string {
if (s) {
// remove newlines
s = s.replace('\\n', '');
// sanitize with path.parse first
const parsed = path.parse(s);
// join it back and replace Windows' stupid backslash with ... | import * as path from 'path';
declare var atom: any;
function parseFilepath(s: string): string {
if (s) {
// remove newlines
s = s.replace('\n', '');
// sanitize with path.parse first
const parsed = path.parse(s);
// join it back and replace Windows' stupid backslash with s... | Fix path parsing with valid \n | Fix path parsing with valid \n
| TypeScript | mit | banacorn/agda-mode,banacorn/agda-mode,banacorn/agda-mode | ---
+++
@@ -5,7 +5,7 @@
function parseFilepath(s: string): string {
if (s) {
// remove newlines
- s = s.replace('\\n', '');
+ s = s.replace('\n', '');
// sanitize with path.parse first
const parsed = path.parse(s);
// join it back and replace Windows' stupid bac... |
f0e3acbe5165a0f2366df87b3d403249ef1d7c3b | src/renderer/index.ts | src/renderer/index.ts | ///<reference path='user_settings_dialog.ts'/>
var remote = require('remote');
var fs = require('fs');
var path = require('path');
var settings = require('../browser/user_settings')
var MainController = require('./main_controller');
var NavigatorController = require('./navigator_controller');
var ngModule = angular.m... | ///<reference path='user_settings_dialog.ts'/>
var remote = require('remote');
var fs = require('fs');
var path = require('path');
var settings = require('../browser/user_settings')
var externalEditor = require('./../browser/external_editor');
var MainController = require('./main_controller');
var NavigatorController ... | Add shortcut key to edit current file | Add shortcut key to edit current file
| TypeScript | mit | ueokande/adversaria,ueokande/adversaria,ueokande/adversaria | ---
+++
@@ -4,9 +4,9 @@
var fs = require('fs');
var path = require('path');
var settings = require('../browser/user_settings')
+var externalEditor = require('./../browser/external_editor');
var MainController = require('./main_controller');
var NavigatorController = require('./navigator_controller');
-
var ngMo... |
c23c8f0bd134289cdee51b26620e57156f1a3efa | public_src/services/config.service.ts | public_src/services/config.service.ts | import {Injectable} from "@angular/core";
const p = require("../../package.json");
@Injectable()
export class ConfigService {
public cfgFilterLines: boolean = true;
static overpassUrl = "https://overpass-api.de/api/interpreter";
static apiTestUrl = "http://api06.dev.openstreetmap.org";
static appName ... | import {Injectable} from "@angular/core";
const p = require("../../package.json");
@Injectable()
export class ConfigService {
public cfgFilterLines: boolean = true;
static overpassUrl = "https://overpass-api.de/api/interpreter";
static baseOsmUrl = "https://www.openstreetmap.org";
static apiUrl = "h... | Adjust app config (API parameters) | Adjust app config (API parameters)
| TypeScript | mit | dkocich/osm-pt-ngx-leaflet,dkocich/osm-pt-ngx-leaflet,dkocich/osm-pt-ngx-leaflet | ---
+++
@@ -5,9 +5,19 @@
@Injectable()
export class ConfigService {
public cfgFilterLines: boolean = true;
+
static overpassUrl = "https://overpass-api.de/api/interpreter";
- static apiTestUrl = "http://api06.dev.openstreetmap.org";
- static appName = p["name"] + "v" + p["version"];
+ static base... |
971df238d14653111589239ef3bd7f01d4508bec | src/commands/info.ts | src/commands/info.ts | import * as Discord from 'discord.js';
import { creator, infoCommand, limitCommand, ordersCommand, priceCommand, regionCommand } from '../market-bot';
import { logCommand } from '../helpers/command-logger';
export async function infoFunction(discordMessage: Discord.Message) {
await discordMessage.channel.sendMessage... | import * as Discord from 'discord.js';
import { creator, infoCommand, limitCommand, ordersCommand, priceCommand, regionCommand } from '../market-bot';
import { logCommand } from '../helpers/command-logger';
export async function infoFunction(discordMessage: Discord.Message) {
await discordMessage.channel.sendMessage... | Use backtics around the url in /i | Use backtics around the url in /i
| TypeScript | mit | Ionaru/MarketBot | ---
+++
@@ -5,7 +5,7 @@
export async function infoFunction(discordMessage: Discord.Message) {
await discordMessage.channel.sendMessage('Greetings, I am MarketBot!\n' +
`I was created by <@${creator.id}> to fetch data from the EVE Online market, ` +
- 'all my data currently comes from https://eve-central.c... |
598121371bebf3f3d5f5decacc0f83b0aa27ae9a | packages/logger/index.ts | packages/logger/index.ts | import * as debug from 'debug'
export function log (namespace: string): debug.IDebugger {
return debug(`machinomy:${namespace}`)
}
| import * as d from 'debug'
class Levels {
namespace: string
_fatal?: d.IDebugger
_error?: d.IDebugger
_warn?: d.IDebugger
_info?: d.IDebugger
_debug?: d.IDebugger
_trace?: d.IDebugger
constructor (namespace: string) {
this.namespace = namespace
}
get fatal (): d.IDebugger {
if (!this._fat... | Replace Logger code with right Logger code. | Replace Logger code with right Logger code.
| TypeScript | apache-2.0 | machinomy/machinomy,machinomy/machinomy,machinomy/machinomy | ---
+++
@@ -1,5 +1,76 @@
-import * as debug from 'debug'
+import * as d from 'debug'
-export function log (namespace: string): debug.IDebugger {
- return debug(`machinomy:${namespace}`)
+class Levels {
+ namespace: string
+ _fatal?: d.IDebugger
+ _error?: d.IDebugger
+ _warn?: d.IDebugger
+ _info?: d.IDebugge... |
e3e1ca02d5db904a645184b389bb8d1186bf2227 | src/bin/sonarwhal.ts | src/bin/sonarwhal.ts | #!/usr/bin/env node
/**
* @fileoverview Main CLI that is run via the sonarwhal command. Based on ESLint.
*/
/* eslint no-console:off, no-process-exit:off */
/*
* ------------------------------------------------------------------------------
* Helpers
* -----------------------------------------------------------... | #!/usr/bin/env node
/**
* @fileoverview Main CLI that is run via the sonarwhal command. Based on ESLint.
*/
/* eslint no-console:off, no-process-exit:off */
/*
* ------------------------------------------------------------------------------
* Helpers
* -----------------------------------------------------------... | Improve error message for unhandled promises | Fix: Improve error message for unhandled promises
The output is more meaningful and now looks like:
```
`Unhandled rejection promise:
uri: FAILING URI
message: ERROR MESSAGE
stack:
STACK TRACE
```
| TypeScript | apache-2.0 | alrra/sonar,alrra/sonar,alrra/sonar,sonarwhal/sonar,sonarwhal/sonar,sonarwhal/sonar | ---
+++
@@ -41,8 +41,12 @@
process.exit(1);
});
-process.once('unhandledRejection', (reason, promise) => {
- console.error(`Unhandled rejection at: Promise ${promise}, reason: ${reason}`);
+process.once('unhandledRejection', (reason) => {
+ console.error(`Unhandled rejection promise:
+ uri: ${reason.... |
c897094a99c24e034a72581fb602df618c784db5 | components/Card.tsx | components/Card.tsx | import { FunctionComponent, Fragment } from "react"
const Card: FunctionComponent = ({ children }) => {
return (
<Fragment>
<div className="card-container">{children}</div>
<style jsx>{`
div.card-container {
background: var(--secondary-background);
border-radius: 8px;
... | import { FunctionComponent, Fragment } from "react"
const Card: FunctionComponent = ({ children }) => {
return (
<Fragment>
<div className="card-container">{children}</div>
<style jsx>{`
div.card-container {
background: var(--secondary-background);
border-radius: 8px;
... | Fix cards not being full width in chrome | Fix cards not being full width in chrome
| TypeScript | mit | JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk,JosephDuffy/josephduffy.co.uk | ---
+++
@@ -10,6 +10,7 @@
border-radius: 8px;
padding: 12px;
margin-bottom: 8px;
+ flex: 1;
}
`}</style>
</Fragment> |
7942d0e00e6a3b956f99be36aa7b9562785ce969 | test/index.ts | test/index.ts | import * as path from 'path';
import { runTests } from 'vscode-test';
async function main() {
try {
// The paths are relative from the `/out/test` folder.
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
const extensionTestsPath = path.resolve(__dirname, './suite');
// Download VS Code, u... | import * as path from 'path';
import { runTests } from 'vscode-test';
async function main() {
try {
// The paths are relative from the `/out/test` folder.
const extensionDevelopmentPath = path.resolve(__dirname, '../../');
const extensionTestsPath = path.resolve(__dirname, './suite');
// Download VS Code, u... | Include error reason for failed test run | Include error reason for failed test run
| TypeScript | mit | darkriszty/MarkdownTablePrettify-VSCodeExt,darkriszty/MarkdownTablePrettify-VSCodeExt | ---
+++
@@ -18,7 +18,7 @@
],
});
} catch (err) {
- console.error('Failed to run tests');
+ console.error('Failed to run tests. Reason: ' + err);
process.exit(1);
}
} |
fe1e01a108369bcaead2959590ad3addb9683988 | webpack/plugins/index.ts | webpack/plugins/index.ts | const StringReplacePlugin = require('string-replace-webpack-plugin');
import constant from './const';
import hoist from './hoist';
import minify from './minify';
import banner from './banner';
const env = process.env.NODE_ENV;
const isProduction = env === 'production';
export default (version, lang) => {
const plug... | const StringReplacePlugin = require('string-replace-webpack-plugin');
import constant from './const';
import hoist from './hoist';
//import minify from './minify';
import banner from './banner';
const env = process.env.NODE_ENV;
const isProduction = env === 'production';
export default (version, lang) => {
const pl... | Disable minification due to artifacts | Disable minification due to artifacts
| TypeScript | mit | Tosuke/misskey,Tosuke/misskey,syuilo/Misskey,syuilo/Misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey | ---
+++
@@ -2,7 +2,7 @@
import constant from './const';
import hoist from './hoist';
-import minify from './minify';
+//import minify from './minify';
import banner from './banner';
const env = process.env.NODE_ENV;
@@ -16,7 +16,7 @@
];
if (isProduction) {
- plugins.push(minify());
+ //plugins.push(mi... |
b2210113755270e1de915cf78cb6372026b0d89a | src/marketplace/common/StepsList.tsx | src/marketplace/common/StepsList.tsx | import * as classNames from 'classnames';
import * as React from 'react';
import { Step } from './Step';
import './StepsList.scss';
interface StepsListProps {
choices: string[];
value: string;
onClick?(step: string): void;
disabled?: boolean;
}
export const StepsList = (props: StepsListProps) => {
const st... | import * as classNames from 'classnames';
import * as React from 'react';
import { Step } from './Step';
import './StepsList.scss';
interface StepsListProps {
choices: string[];
value: string;
onClick?(step: string): void;
disabled?: boolean;
}
export const StepsList = (props: StepsListProps) => {
const st... | Check if optional click callback is defined in steps component. | Check if optional click callback is defined in steps component.
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -22,7 +22,7 @@
title={`${index + 1}. ${title}`}
complete={stepIndex > index}
active={stepIndex === index}
- onClick={() => props.onClick(title)}
+ onClick={() => props.onClick && props.onClick(title)}
/>
))}
</div> |
afaf8bc39f13e647fc742ff2146461082cb7ded5 | src/linter-configs.ts | src/linter-configs.ts | export interface LinterConfig {
name: string;
configFiles: string[];
extension: string;
enableConfig: string;
packageJSONConfig?: string;
}
export const LINTERS: LinterConfig[] = [
{
name: 'ESLint',
configFiles: [
'.eslintrc',
'.eslintrc.js',
... | export interface LinterConfig {
name: string;
configFiles: string[];
extension: string;
enableConfig: string;
packageJSONConfig?: string;
}
export const LINTERS: LinterConfig[] = [
{
name: 'ESLint',
configFiles: [
'.eslintrc',
'.eslintrc.js',
... | Check package.json for jscsConfig and check for .jscs.json | Check package.json for jscsConfig and check for .jscs.json
| TypeScript | mit | t-sauer/autolinting-for-javascript | ---
+++
@@ -31,9 +31,11 @@
{
name: 'JSCS',
configFiles: [
- '.jscsrc'
+ '.jscsrc',
+ '.jscs.json'
],
extension: 'jscs',
- enableConfig: 'jscs.enable'
+ enableConfig: 'jscs.enable',
+ packageJSONConfig: 'jscsConfig'
}
... |
d2dadb41c7958a1b6f5ed7bf6f34af7d73668b06 | scripts/Actions/Video.ts | scripts/Actions/Video.ts | import AnimeNotifier from "../AnimeNotifier"
// Play video
export function playVideo(arn: AnimeNotifier, video: HTMLVideoElement) {
video.volume = arn.audioPlayer.volume
if(video.readyState >= 2) {
togglePlayVideo(video)
return
}
video.addEventListener("canplay", () => {
togglePlayVideo(video)
})
video.... | import AnimeNotifier from "../AnimeNotifier"
// Play video
export function playVideo(arn: AnimeNotifier, video: HTMLVideoElement) {
video.volume = arn.audioPlayer.volume
if(video.readyState >= 2) {
togglePlayVideo(video)
return
}
video.addEventListener("canplay", () => {
togglePlayVideo(video)
})
video.... | Use prefixed document.fullscreen if necessary | Use prefixed document.fullscreen if necessary
| TypeScript | mit | animenotifier/notify.moe,animenotifier/notify.moe,animenotifier/notify.moe | ---
+++
@@ -30,8 +30,9 @@
let element = document.getElementById(elementId)
let requestFullscreen = element.requestFullscreen || element["mozRequestFullScreen"] || element["webkitRequestFullScreen"] || element["msRequestFullscreen"]
let exitFullscreen = document.exitFullscreen || document["mozCancelFullScreen"] ... |
973d2fe6374494f0f8e3df3e2bae99d8c2649418 | src/gerrit/controller.ts | src/gerrit/controller.ts | import { Gerrit } from "./gerrit";
import { Ref } from "./ref";
export class GerritController {
constructor(private gerrit: Gerrit) {
}
public checkoutBranch() {
this.gerrit.checkoutBranch("master");
}
public checkoutRevision() {
let newRef: Ref = new Ref(0, 0);
this.ger... | import { window, InputBoxOptions } from "vscode";
import { Gerrit } from "./gerrit";
import { Ref } from "./ref";
export class GerritController {
constructor(private gerrit: Gerrit) {
}
public checkoutBranch() {
let options: InputBoxOptions = {
value: "master",
prompt: "Th... | Add input boxes for commands | Add input boxes for commands
| TypeScript | mit | tht13/gerrit-vscode | ---
+++
@@ -1,3 +1,4 @@
+import { window, InputBoxOptions } from "vscode";
import { Gerrit } from "./gerrit";
import { Ref } from "./ref";
@@ -7,22 +8,60 @@
}
public checkoutBranch() {
+ let options: InputBoxOptions = {
+ value: "master",
+ prompt: "The branch to checkout"... |
e39695527caa66be5a2ae7c6587abe062a8e1810 | app/app.component.ts | app/app.component.ts | import {Component} from "angular2/core";
import {RouteConfig} from "angular2/router";
import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router";
import * as Config from "./shared/config";
import {LoginPage} from "./pages/login/login.component";
import {ListPage} from "./pages/list/list.component";
var startOnL... | import {Component} from "angular2/core";
import {RouteConfig} from "angular2/router";
import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router";
import * as Config from "./shared/config";
import {LoginPage} from "./pages/login/login.component";
import {ListPage} from "./pages/list/list.component";
var startOnL... | Make the useAsDefault flag work by making sure no existing routes use the root path | Make the useAsDefault flag work by making sure no existing routes use the root path
| TypeScript | mit | qtagtech/nativescript_tutorial,anhoev/cms-mobile,dzfweb/sample-groceries,tjvantoll/sample-Groceries,poly-mer/community,Icenium/nativescript-sample-groceries,poly-mer/community,tjvantoll/sample-Groceries,NativeScript/sample-Groceries,qtagtech/nativescript_tutorial,poly-mer/community,qtagtech/nativescript_tutorial,Native... | ---
+++
@@ -14,7 +14,7 @@
template: "<StackLayout><page-router-outlet></page-router-outlet></StackLayout>"
})
@RouteConfig([
- { path: "/", component: LoginPage, as: "Login", useAsDefault: !startOnList },
+ { path: "/Login", component: LoginPage, as: "Login", useAsDefault: !startOnList },
{ path: "/List", c... |
127f00f6d9d83c98ea276b4a5f2c0832dca7ccb3 | app/src/ui/create-branch/sanitized-branch-name.ts | app/src/ui/create-branch/sanitized-branch-name.ts | /** Sanitize a proposed branch name by replacing illegal characters. */
export function sanitizedBranchName(name: string): string {
return name.replace(/[\x00-\x20\x7F~^:?*\[\\|""<>]|@{|\.\.+|^\.|\.$|\.lock$|\/$/g, '-')
.replace(/--+/g, '-')
.replace(/^-/g, '')
}
| /** Sanitize a proposed branch name by replacing illegal characters. */
export function sanitizedBranchName(name: string): string {
// See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
// ASCII Control chars and space, DEL, ~ ^ : ? * [ \
// | " < and > is technically a valid refname b... | Add comment about the sanitization regex | Add comment about the sanitization regex
| TypeScript | mit | kactus-io/kactus,hjobrien/desktop,gengjiawen/desktop,artivilla/desktop,hjobrien/desktop,shiftkey/desktop,say25/desktop,desktop/desktop,BugTesterTest/desktops,artivilla/desktop,BugTesterTest/desktops,say25/desktop,j-f1/forked-desktop,kactus-io/kactus,kactus-io/kactus,gengjiawen/desktop,BugTesterTest/desktops,kactus-io/k... | ---
+++
@@ -1,5 +1,9 @@
/** Sanitize a proposed branch name by replacing illegal characters. */
export function sanitizedBranchName(name: string): string {
+ // See https://www.kernel.org/pub/software/scm/git/docs/git-check-ref-format.html
+ // ASCII Control chars and space, DEL, ~ ^ : ? * [ \
+ // | " < and > i... |
9f282bf8846ab24c14d7ccd598487d562306699a | app/react/src/server/framework-preset-react-docgen.ts | app/react/src/server/framework-preset-react-docgen.ts | import type { TransformOptions } from '@babel/core';
import type { Configuration } from 'webpack';
import type { StorybookOptions } from '@storybook/core/types';
import ReactDocgenTypescriptPlugin from 'react-docgen-typescript-plugin';
export function babel(config: TransformOptions, { typescriptOptions }: StorybookOpt... | import type { TransformOptions } from '@babel/core';
import type { Configuration } from 'webpack';
import type { StorybookOptions } from '@storybook/core/types';
import ReactDocgenTypescriptPlugin from 'react-docgen-typescript-plugin';
export function babel(config: TransformOptions, { typescriptOptions }: StorybookOpt... | Fix react-docgen for JS files | React: Fix react-docgen for JS files
| TypeScript | mit | storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/react-storybook,kadirahq/react-storybook,storybooks/storybook,storybooks/react-storybook | ---
+++
@@ -5,10 +5,6 @@
export function babel(config: TransformOptions, { typescriptOptions }: StorybookOptions) {
const { reactDocgen } = typescriptOptions;
-
- if (!reactDocgen || reactDocgen === 'react-docgen-typescript') {
- return config;
- }
return {
...config, |
2a76afda7fb7f514a04e35053e98a83a92ac5959 | packages/components/containers/payments/Alert3ds.tsx | packages/components/containers/payments/Alert3ds.tsx | import { c } from 'ttag';
import React from 'react';
import americanExpressSafekeySvg from 'design-system/assets/img/bank-icons/amex-safekey.svg';
import discoverProtectBuySvg from 'design-system/assets/img/bank-icons/discover-protectbuy.svg';
import mastercardSecurecodeSvg from 'design-system/assets/img/bank-icons/mas... | import { c } from 'ttag';
import React from 'react';
import americanExpressSafekeySvg from 'design-system/assets/img/bank-icons/amex-safekey.svg';
import discoverProtectBuySvg from 'design-system/assets/img/bank-icons/discover-protectbuy.svg';
import mastercardSecurecodeSvg from 'design-system/assets/img/bank-icons/mas... | Fix alert 3ds dom nesting | Fix alert 3ds dom nesting
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -7,7 +7,7 @@
const Alert3ds = () => {
return (
- <p>
+ <div className="mt1-5 mb1-5">
<div className="mb0-5">{c('Info').t`We use 3-D Secure to protect your payments.`}</div>
<div className="flex flex-nowrap flex-align-items-center">
<img heigh... |
6eeaa7f32aa3fb2040e01a34fd22ce76dab1ef7c | lib/mappers/AutoMapper.ts | lib/mappers/AutoMapper.ts | import {AttributesMapperFactory} from "./AttributesMapperFactory";
import Record from "neo4j-driver/types/v1/record";
import {Node, Relationship} from "neo4j-driver/types/v1/graph-types";
import {isNode, isRelationship} from "../driver/NeoTypes";
export class AutoMapper {
constructor(private attributesMapperFacto... | import {AttributesMapperFactory} from "./AttributesMapperFactory";
import Record from "neo4j-driver/types/v1/record";
import {Node, Relationship} from "neo4j-driver/types/v1/graph-types";
import {isNode, isRelationship} from "../driver/NeoTypes";
import * as _ from 'lodash';
export class AutoMapper {
constructor(... | Add mapping for nested arrays | Add mapping for nested arrays
| TypeScript | mit | robak86/neography | ---
+++
@@ -2,6 +2,7 @@
import Record from "neo4j-driver/types/v1/record";
import {Node, Relationship} from "neo4j-driver/types/v1/graph-types";
import {isNode, isRelationship} from "../driver/NeoTypes";
+import * as _ from 'lodash';
export class AutoMapper {
@@ -11,21 +12,29 @@
return records.map((r... |
907ff003002e3eb218be1f025d2b807c1ce0d83e | tests/app/main.ts | tests/app/main.ts | import '../../src/utils/polyfills';
import Vue from 'vue';
import router from './router';
import '../../src/styles/main.scss';
import ComponentsPlugin from '../../src/components';
import DirectivesPlugin from '../../src/directives';
import UtilsPlugin, { UtilsPluginOptions } from '../../src/utils';
import Meta from '... | import '../../src/utils/polyfills';
import Vue from 'vue';
import router from './router';
import '../../src/styles/main.scss';
import ComponentsPlugin from '../../src/components';
import DirectivesPlugin from '../../src/directives';
import UtilsPlugin, { UtilsPluginOptions } from '../../src/utils';
import Meta from '... | Move meta files to website - fix build | Move meta files to website - fix build
| TypeScript | apache-2.0 | ulaval/modul-components,ulaval/modul-components,ulaval/modul-components | ---
+++
@@ -8,7 +8,6 @@
import UtilsPlugin, { UtilsPluginOptions } from '../../src/utils';
import Meta from '../../src/meta/meta';
-import MetaAll from '../../src/meta/meta-all';
import I18nLanguagePlugin, { currentLang, FRENCH } from '../../src/utils/i18n/i18n';
import FrenchPlugin from '../../src/lang/fr';
i... |
b9652f228a383eb4d869deeee47a66b04589d643 | playwright.config.ts | playwright.config.ts | /**
* Configuration for Playwright using default from @jupyterlab/galata
*/
import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './nbgrader/tests/labextension_ui-tests',
testMatch: '**/*.spec.ts',
testIgnore: '**/node_modules/**/*',
timeout: 30000,
... | /**
* Configuration for Playwright using default from @jupyterlab/galata
*/
import type { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: './nbgrader/tests/labextension_ui-tests',
testMatch: '**/*.spec.ts',
testIgnore: '**/node_modules/**/*',
timeout: 30000,
... | Allow only one playwright worker to avoid errors | Allow only one playwright worker to avoid errors
| TypeScript | bsd-3-clause | jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jupyter/nbgrader,jhamrick/nbgrader,jhamrick/nbgrader | ---
+++
@@ -10,6 +10,7 @@
testIgnore: '**/node_modules/**/*',
timeout: 30000,
reporter: [[process.env.CI ? 'dot' : 'list'], ['html']],
+ workers: 1,
use: {
// Browser options
// headless: false, |
0e52ee27b6ce70446ff147c9b835907df96217fc | src/app/app.spec.ts | src/app/app.spec.ts | import {
beforeEachProviders,
inject,
injectAsync,
it
} from '@angular/core/testing';
// Load the implementations that should be tested
import { App } from './app.component';
import { AppState } from './app.service';
describe('App', () => {
// provide our implementations or mocks to the dependency injector
... | import {
beforeEachProviders,
inject,
injectAsync,
it
} from '@angular/core/testing';
// Load the implementations that should be tested
import { App } from './app.component';
import { AppState } from './app.service';
describe('App', () => {
// provide our implementations or mocks to the dependency injector
... | Remove needless test from seed project | Remove needless test from seed project
| TypeScript | mit | bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder | ---
+++
@@ -15,9 +15,4 @@
AppState,
App
]);
-
- it('should have a url', inject([ App ], (app) => {
- expect(app.url).toEqual('https://twitter.com/AngularClass');
- }));
-
}); |
6a649521ef2efb496f9a2d52dab0b587b79f6498 | source/commands/danger.ts | source/commands/danger.ts | #! /usr/bin/env node
import * as program from "commander"
import * as debug from "debug"
import chalk from "chalk"
import { version } from "../../package.json"
import setSharedArgs, { SharedCLI } from "./utils/sharedDangerfileArgs"
import { runRunner } from "./run/runner"
const d = debug("danger:runner")
d(`argv: ${... | #! /usr/bin/env node
import * as program from "commander"
import * as debug from "debug"
import chalk from "chalk"
import { version } from "../../package.json"
import setSharedArgs, { SharedCLI } from "./utils/sharedDangerfileArgs"
import { runRunner } from "./run/runner"
const d = debug("danger:runner")
d(`argv: ${... | Add the options after all the commands etc are set up | Add the options after all the commands etc are set up
| TypeScript | mit | danger/danger-js,danger/danger-js,danger/danger-js,danger/danger-js | ---
+++
@@ -17,7 +17,6 @@
})
// Provides the root node to the command-line architecture
-setSharedArgs(program)
program
.version(version)
@@ -26,7 +25,9 @@
.command("pr", "Runs your changes against an existing PR")
.command("runner", "Runs a dangerfile against a DSL passed in via STDIN")
.command("... |
d442eb06da8456d002a746f66dd44a2b47b190d5 | client/Commands/components/Toolbar.tsx | client/Commands/components/Toolbar.tsx | import * as React from "react";
export interface ToolbarProps {
}
export class Toolbar extends React.Component<ToolbarProps> {
public render() {
return "TOOLBAR";
}
} | import * as React from "react";
interface ToolbarProps {
}
interface ToolbarState {
displayWide: boolean;
}
export class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
constructor(props: ToolbarProps){
super(props);
this.setState({
displayWide: false
});
... | Add wrapper with display width CSS | Add wrapper with display width CSS
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -1,11 +1,24 @@
import * as React from "react";
-export interface ToolbarProps {
+interface ToolbarProps {
}
-export class Toolbar extends React.Component<ToolbarProps> {
+interface ToolbarState {
+ displayWide: boolean;
+}
+
+export class Toolbar extends React.Component<ToolbarProps, ToolbarStat... |
021fab9d2d2786a7b17146a92fb5b191fea73ee2 | packages/lesswrong/lib/rss_urls.ts | packages/lesswrong/lib/rss_urls.ts | import { siteUrlSetting } from './instanceSettings';
export const rssTermsToUrl = (terms) => {
const siteUrl = siteUrlSetting.get();
const terms_as_GET_params = Object.keys(terms).map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(terms[k])).join('&')
return siteUrl+"feed.xml?"+terms_as_GET_params;
}
| import { getSiteUrl } from './vulcan-lib/utils';
export const rssTermsToUrl = (terms) => {
const siteUrl = getSiteUrl();
const terms_as_GET_params = Object.keys(terms).map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(terms[k])).join('&')
return siteUrl+"feed.xml?"+terms_as_GET_params;
}
| Fix a broken RSS link (missing slash) | Fix a broken RSS link (missing slash)
| TypeScript | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -1,7 +1,7 @@
-import { siteUrlSetting } from './instanceSettings';
+import { getSiteUrl } from './vulcan-lib/utils';
export const rssTermsToUrl = (terms) => {
- const siteUrl = siteUrlSetting.get();
+ const siteUrl = getSiteUrl();
const terms_as_GET_params = Object.keys(terms).map((k) => encodeURIC... |
0eff2ef6f44a4043b1b49c6a6f7c1a6cd4c8b13e | app/app.component.ts | app/app.component.ts | import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: '
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div><label>name: </label>{{hero.name}}</div>
'
})
export class AppComponent {
title = 'Tour of Heroes';
hero: Hero = {
id: 1... | import { Component } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div><label>name: </label>{{hero.name}}</div>
`
})
export class AppComponent {
title = 'Tour of Heroes';
hero: Hero = {
id: 1... | Change template to multi-line. Should not change UI | Change template to multi-line. Should not change UI
| TypeScript | mit | atbtm/Angular2-Pull-Repo,atbtm/Angular2-Pull-Repo,atbtm/Angular2-Pull-Repo | ---
+++
@@ -2,12 +2,12 @@
@Component({
selector: 'my-app',
- template: '
+ template: `
<h1>{{title}}</h1>
<h2>{{hero.name}} details!</h2>
<div><label>id: </label>{{hero.id}}</div>
<div><label>name: </label>{{hero.name}}</div>
- '
+ `
})
export class AppComponent {
title = 'Tour of Heroes'; |
875226c910042e2d6b8a2d93b394bf2b38e32da7 | client/Components/Overlay.tsx | client/Components/Overlay.tsx | import * as React from "react";
import * as ReactDOM from "react-dom";
interface OverlayProps {
maxHeightPx?: number;
handleMouseEvents?: (e: React.MouseEvent<HTMLDivElement>) => void;
left?: number;
top?: number;
}
interface OverlayState { }
export class Overlay extends React.Component<OverlayProps,... | import * as React from "react";
import * as ReactDOM from "react-dom";
interface OverlayProps {
maxHeightPx?: number;
handleMouseEvents?: (e: React.MouseEvent<HTMLDivElement>) => void;
left?: number;
top?: number;
}
interface OverlayState {
height: number;
}
export class Overlay extends React.Co... | Use State instead of local var for height tracking | Use State instead of local var for height tracking
Removes the need for forceUpdate()
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -8,13 +8,20 @@
top?: number;
}
-interface OverlayState { }
+interface OverlayState {
+ height: number;
+}
export class Overlay extends React.Component<OverlayProps, OverlayState> {
- private height?: number;
+ constructor(props: OverlayProps) {
+ super(props);
+ this.stat... |
452a8551bc79705a947c2337383c180a0b833a8a | ERClient/src/app/er.service.ts | ERClient/src/app/er.service.ts | import { Injectable } from '@angular/core';
import { Headers, Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Emotion } from './emotion';
import 'rxjs/Rx'; //for operators
@Injectable()
export class ErService {
private erServerUrl = 'er';
constructor(private http: Ht... | import { Injectable } from '@angular/core';
import { Headers, RequestOptions, Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Emotion } from './emotion';
import 'rxjs/Rx'; //for operators
@Injectable()
export class ErService {
private erServerUrl = 'er';
constructor(... | Call sentence POST API with content-type json | Call sentence POST API with content-type json
| TypeScript | apache-2.0 | shioyang/EmotionalReader,shioyang/EmotionalReader,shioyang/EmotionalReader | ---
+++
@@ -1,5 +1,5 @@
import { Injectable } from '@angular/core';
-import { Headers, Http, Response } from '@angular/http';
+import { Headers, RequestOptions, Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import { Emotion } from './emotion';
@@ -17,7 +17,9 @@
}
ge... |
362a854d5af5c616007fab2054efd0eaed24fa08 | src/index.ts | src/index.ts | export function Enum<V extends string>(...values: V[]): { [K in V]: K };
export function Enum<
T extends { [_: string]: V },
V extends string
>(definition: T): T;
export function Enum(...values: any[]): object {
if (typeof values[0] === "string") {
const result: any = {};
for (const value of... | export function Enum<V extends string>(...values: V[]): { [K in V]: K };
export function Enum<
T extends { [_: string]: V },
V extends string
>(definition: T): T;
export function Enum(...values: any[]): object {
if (typeof values[0] === "string") {
const result: any = {};
for (const value of... | Use Object.keys() instead of for..in | Use Object.keys() instead of for..in
| TypeScript | mit | dphilipson/typescript-string-enums | ---
+++
@@ -18,20 +18,10 @@
export type Enum<T extends object> = T[keyof T];
export namespace Enum {
- function hasOwnProperty(obj: object, prop: string): boolean {
- return Object.prototype.hasOwnProperty.call(obj, prop);
- }
-
export function keys<
T extends { [_: string]: any }
... |
2d65e3204e23104517868838dc10d5175a83fee9 | common/CombatantState.ts | common/CombatantState.ts | import { DurationTiming } from "./DurationTiming";
import { StatBlock } from "./StatBlock";
export interface TagState {
Text: string;
DurationRemaining: number;
DurationTiming: DurationTiming;
DurationCombatantId: string;
}
export interface CombatantState {
Id: string;
StatBlock: StatBlock;
... | import { DurationTiming } from "./DurationTiming";
import { StatBlock } from "./StatBlock";
export interface TagState {
Text: string;
DurationRemaining: number;
DurationTiming: DurationTiming;
DurationCombatantId: string;
}
export interface CombatantState {
Id: string;
StatBlock: StatBlock;
... | Remove URL from combatant state | Remove URL from combatant state
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -22,5 +22,4 @@
Tags: string[] | TagState[];
Hidden: boolean;
InterfaceVersion: string;
- ImageURL: string;
} |
9e9e164267517d88420b79b83bcf8bc189602009 | lib/language-idris.ts | lib/language-idris.ts | import { IdrisController } from './idris-controller'
import { CompositeDisposable } from 'atom'
import * as url from 'url'
import { IdrisPanel } from './views/panel-view'
let controller: IdrisController | null = null
let subscriptions = new CompositeDisposable()
export function activate() {
controller = new Idris... | import { IdrisController } from './idris-controller'
import { CompositeDisposable } from 'atom'
import * as url from 'url'
import { IdrisPanel } from './views/panel-view'
let controller: IdrisController | null = null
let subscriptions = new CompositeDisposable()
export function activate() {
controller = new Idris... | Return autocomplete-plus provider from provide function | Return autocomplete-plus provider from provide function
| TypeScript | mit | idris-hackers/atom-language-idris | ---
+++
@@ -37,6 +37,6 @@
export const provide = () => {
if (controller) {
- controller.provideReplCompletions()
+ return controller.provideReplCompletions()
}
} |
71661ff68328776b0842d53dca128e2f536d370c | time/src/run-virtually.ts | time/src/run-virtually.ts | require('setimmediate');
function runVirtually (scheduler, done, currentTime, setTime, timeToRunTo = null) {
function processEvent () {
const nextEvent = scheduler.peek();
if (!nextEvent) {
done();
return;
}
const outOfTime = timeToRunTo && nextEvent.time >= timeToRunTo;
if (outOfT... | require('setimmediate');
function processEvent (args) {
const {scheduler, done, currentTime, setTime, timeToRunTo} = args;
const nextEvent = scheduler.peek();
const outOfTime = nextEvent && timeToRunTo && nextEvent.time >= timeToRunTo;
if (!nextEvent || outOfTime) {
done();
return;
}
const eventT... | Refactor runVirtually to pass arguments instead of closing over | Refactor runVirtually to pass arguments instead of closing over
| TypeScript | mit | feliciousx-open-source/cyclejs,usm4n/cyclejs,feliciousx-open-source/cyclejs,feliciousx-open-source/cyclejs,cyclejs/cyclejs,ntilwalli/cyclejs,ntilwalli/cyclejs,cyclejs/cyclejs,ntilwalli/cyclejs,cyclejs/cyclejs,staltz/cycle,staltz/cycle,ntilwalli/cyclejs,cyclejs/cycle-core,cyclejs/cyclejs,usm4n/cyclejs,cyclejs/cycle-core... | ---
+++
@@ -1,52 +1,49 @@
require('setimmediate');
-function runVirtually (scheduler, done, currentTime, setTime, timeToRunTo = null) {
- function processEvent () {
- const nextEvent = scheduler.peek();
+function processEvent (args) {
+ const {scheduler, done, currentTime, setTime, timeToRunTo} = args;
+ con... |
a3eea8a2444dd93db3de190bec5b3398b3b762d7 | src/app/_models/user.ts | src/app/_models/user.ts | export class User {
id?: string;
userName: string;
firstName: string;
lastName: string;
password: string;
country: string;
email: string;
birthdate: string;
avatar: any;
contacts?: Array<string>;
} | export class User {
id?: string;
userName: string;
firstName: string;
lastName: string;
password: string;
country: string;
email: string;
birthdate: string;
avatar: File;
contacts?: Array<string>;
} | Change avatar type to File | Change avatar type to File
| TypeScript | mit | tallerify/admin-panel-ui,tallerify/admin-panel-ui,tallerify/admin-panel-ui | ---
+++
@@ -7,6 +7,6 @@
country: string;
email: string;
birthdate: string;
- avatar: any;
+ avatar: File;
contacts?: Array<string>;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.