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 |
|---|---|---|---|---|---|---|---|---|---|---|
4ad88f935cd1440e101c47644ed55c4e38afc117 | packages/components/hooks/useOrganization.ts | packages/components/hooks/useOrganization.ts | import { useCallback } from 'react';
import { Organization } from '@proton/shared/lib/interfaces';
import { FREE_ORGANIZATION } from '@proton/shared/lib/constants';
import { OrganizationModel } from '@proton/shared/lib/models/organizationModel';
import { UserModel } from '@proton/shared/lib/models/userModel';
import u... | import { useCallback } from 'react';
import { Organization } from '@proton/shared/lib/interfaces';
import { FREE_ORGANIZATION } from '@proton/shared/lib/constants';
import { OrganizationModel } from '@proton/shared/lib/models/organizationModel';
import useCachedModelResult, { getPromiseValue } from './useCachedModelRe... | Use async user hook in organization | Use async user hook in organization
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -2,19 +2,18 @@
import { Organization } from '@proton/shared/lib/interfaces';
import { FREE_ORGANIZATION } from '@proton/shared/lib/constants';
import { OrganizationModel } from '@proton/shared/lib/models/organizationModel';
-import { UserModel } from '@proton/shared/lib/models/userModel';
import useC... |
579c8c20d48bb5288724d755eae0a9dd94b88ef5 | src/Engines/WebGPU/webgpuHardwareTexture.ts | src/Engines/WebGPU/webgpuHardwareTexture.ts | import { HardwareTextureWrapper } from '../../Materials/Textures/hardwareTextureWrapper';
import { Nullable } from '../../types';
import * as WebGPUConstants from './webgpuConstants';
/** @hidden */
export class WebGPUHardwareTexture implements HardwareTextureWrapper {
private _webgpuTexture: Nullable<GPUT... | import { HardwareTextureWrapper } from '../../Materials/Textures/hardwareTextureWrapper';
import { Nullable } from '../../types';
import * as WebGPUConstants from './webgpuConstants';
/** @hidden */
export class WebGPUHardwareTexture implements HardwareTextureWrapper {
private _webgpuTexture: Nullable<GPUT... | Remove the accessors, use public properties instead | Remove the accessors, use public properties instead
| TypeScript | apache-2.0 | NicolasBuecher/Babylon.js,NicolasBuecher/Babylon.js,sebavan/Babylon.js,Kesshi/Babylon.js,RaananW/Babylon.js,sebavan/Babylon.js,Kesshi/Babylon.js,NicolasBuecher/Babylon.js,BabylonJS/Babylon.js,RaananW/Babylon.js,RaananW/Babylon.js,Kesshi/Babylon.js,BabylonJS/Babylon.js,sebavan/Babylon.js,BabylonJS/Babylon.js | ---
+++
@@ -6,27 +6,19 @@
export class WebGPUHardwareTexture implements HardwareTextureWrapper {
private _webgpuTexture: Nullable<GPUTexture>;
- private _webgpuTextureView: Nullable<GPUTextureView>;
- private _webgpuSampler: Nullable<GPUSampler>;
public get underlyingResource(): Nullable<GPUTextu... |
9d1fcb8ccf18102dafca47d5b1a28a765ea4bb49 | src/ts/worker/senders.ts | src/ts/worker/senders.ts | /// <reference path="../../../node_modules/typescript/lib/lib.webworker.d.ts" />
import { ClearMessage, DisplayMessage, InputType } from '../messages'
import { State } from './state'
import { stringToUtf8ByteArray } from '../util'
export function sendClear(type: InputType) {
const message: ClearMessage = {
acti... | /// <reference path="../../../node_modules/typescript/lib/lib.webworker.d.ts" />
import { ClearMessage, DisplayMessage, InputType } from '../messages'
import { State } from './state'
import { stringToUtf8ByteArray } from '../util'
export function sendClear(type: InputType) {
const message: ClearMessage = {
acti... | Handle undefined input to sendCharacter | Handle undefined input to sendCharacter
| TypeScript | mit | Alexendoo/utf,Alexendoo/utf,Alexendoo/utf,Alexendoo/utf | ---
+++
@@ -13,7 +13,8 @@
self.postMessage(message)
}
-export function sendCharacter(input: string) {
+export function sendCharacter(input?: string) {
+ if (input === undefined) return
const codePoint = input.codePointAt(0)
const block = getBlock(codePoint) |
bb3b93fa0473504db53b5fc135ea855a2e8946d5 | source/main/trezor/connection.ts | source/main/trezor/connection.ts | import TrezorConnect from 'trezor-connect';
import { logger } from '../utils/logging';
import { manifest } from './manifest';
export const initTrezorConnect = async () => {
try {
await TrezorConnect.init({
popup: false, // render your own UI
webusb: false, // webusb is not supported in electron
... | import TrezorConnect from 'trezor-connect';
import { logger } from '../utils/logging';
import { manifest } from './manifest';
export const initTrezorConnect = async () => {
try {
await TrezorConnect.init({
popup: false, // render your own UI
webusb: false, // webusb is not supported in electron
... | Stop re-throwing Trezor initialization errors | [DDW-1108] Stop re-throwing Trezor initialization errors
| TypeScript | apache-2.0 | input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus,input-output-hk/daedalus | ---
+++
@@ -14,7 +14,6 @@
logger.info('[TREZOR-CONNECT] Called TrezorConnect.init()');
} catch (error) {
logger.info('[TREZOR-CONNECT] Failed to call TrezorConnect.init()');
- throw error;
}
};
|
bae68a89a603158267d1edfb79e5c5b4b08a40f6 | src/renderer/transcriptEditor.ts | src/renderer/transcriptEditor.ts | import { Quill } from "quill";
import { formatTimestampsOnTextChange } from "./formatTimestamps";
const customBlots = ["Timestamp"];
const registerBlots = (blotNames: string[]) => {
blotNames.map(
( blotName ) => {
const blotPath = `./../blots/${blotName}`;
const blot = require(blotPath);
Quil... | import { Quill } from "quill";
import { formatTimestampsOnTextChange } from "./formatTimestamps";
const customBlots = ["Timestamp"];
const registerBlots = (blotNames: string[]) => {
blotNames.map((blotName) => {
const blotPath = `./../blots/${blotName}`;
const blot = require(blotPath);
Quill.register(bl... | Add a separate `export { }` directive | Add a separate `export { }` directive
| TypeScript | agpl-3.0 | briandk/transcriptase,briandk/transcriptase | ---
+++
@@ -4,16 +4,14 @@
const customBlots = ["Timestamp"];
const registerBlots = (blotNames: string[]) => {
- blotNames.map(
- ( blotName ) => {
- const blotPath = `./../blots/${blotName}`;
- const blot = require(blotPath);
- Quill.register(blot);
- },
- );
+ blotNames.map((blotName) => ... |
aa0707fa2775d9c07858046245c0d6f0280828cd | src/components/calendar/calendar.module.ts | src/components/calendar/calendar.module.ts | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { CalendarComponent } from './calendar.component';
@NgModule({
declarations: [CalendarComponent],
exports: [CalendarComponent],
imports: [BrowserModule, Forms... | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { CalendarComponent } from './calendar.component';
@NgModule({
declarations: [CalendarComponent],
exports: [CalendarComponent],
imports: [CommonModule, FormsMo... | Replace BrowserModule with CommonModule in calendar | Replace BrowserModule with CommonModule in calendar
| TypeScript | mit | swimlane/ngx-ui,swimlane/ngx-ui,Hypercubed/ngx-ui,swimlane/ngx-ui,Hypercubed/ngx-ui,Hypercubed/ngx-ui,Hypercubed/ngx-ui,swimlane/ngx-ui | ---
+++
@@ -1,5 +1,5 @@
import { NgModule } from '@angular/core';
-import { BrowserModule } from '@angular/platform-browser';
+import { CommonModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { CalendarComponent } from './calendar.component';
@@ -7,6 +7,6 @@
@NgModu... |
c0effc11163ea16d8213613deeed44f911e9aeb1 | apps/docs/src/common/page-wrap.tsx | apps/docs/src/common/page-wrap.tsx | import { FC, createElement as h } from 'react';
import { PageProps } from '@not-govuk/app-composer';
import { Page } from '@hods/components';
import './app.scss';
export const PageWrap: FC<PageProps> = ({ children }) => {
const navigation = [
{ href: '/get-started', text: 'Get started' },
{ href: '/styles',... | import { FC, createElement as h } from 'react';
import { PageProps } from '@not-govuk/app-composer';
import { Page } from '@hods/components';
import './app.scss';
export const PageWrap: FC<PageProps> = ({ children }) => {
const navigation = [
{ href: '/get-started', text: 'Get started' },
{ href: '/styles',... | Update use of Page component | docs: Update use of Page component
| TypeScript | mit | eliothill/home-office-digital-patterns,eliothill/home-office-digital-patterns,eliothill/home-office-digital-patterns | ---
+++
@@ -24,7 +24,8 @@
<Page
footerNavigation={footerNavigation}
navigation={navigation}
- title="Design System"
+ serviceName="Design System"
+ title="Home Office Design System"
>
{children}
</Page> |
43d671dc661a23df2da41f93e5a6c7c5784b0cac | test/_builders/stream-builder.ts | test/_builders/stream-builder.ts | import { IStream } from "../../src/stream/stream.i";
export class StreamBuilder {
public build(): IStream {
return <IStream> {
writeLine: (message: string) => { }
};
}
}
| import { IStream } from "../../src/stream/stream.i";
export class StreamBuilder {
public build(): IStream {
return <IStream> {
writeLine: (message: string) => { },
write: (message: string) => { },
moveCursor: (x: number, y: number) => { },
cursorTo: (x: numb... | Add new methods to StreamBuilders | Add new methods to StreamBuilders
| TypeScript | mit | alsatian-test/tap-bark,alsatian-test/tap-bark | ---
+++
@@ -4,7 +4,11 @@
public build(): IStream {
return <IStream> {
- writeLine: (message: string) => { }
+ writeLine: (message: string) => { },
+ write: (message: string) => { },
+ moveCursor: (x: number, y: number) => { },
+ cursorTo: (x: numb... |
4ef928ca86b88b22b88295815e3f4812540fcf9f | scripts/utils/generateTypings.ts | scripts/utils/generateTypings.ts | import * as fs from 'fs';
import * as path from 'path';
import { Definition } from '../../src/components/definition';
const configs = require('../configs.json');
const cwd = process.cwd();
export type Logger = (data: LoggerData) => void;
export interface LoggerData {
input: string;
output: string;
}
const templ... | import * as fs from 'fs';
import * as path from 'path';
import { Definition } from '../../src/components/definition';
const configs = require('../configs.json');
const cwd = process.cwd();
export type Logger = (data: LoggerData) => void;
export interface LoggerData {
input: string;
output: string;
}
const templ... | Update scripts catch compile error | Update scripts
catch compile error
| TypeScript | mit | ikatyang/types-ramda,ikatyang/types-ramda | ---
+++
@@ -21,7 +21,13 @@
const templateTsFiles = Array.from(new Set(templateFiles.map(
file => extRegex.test(file) ? file.replace(extRegex, '.ts') : file)));
templateTsFiles.forEach(templateTsFile => {
- const templateModule = require(templateTsFile).default;
+ let templateModule;
+ try {
+ ... |
5741a4ff4ebf7c1a92f6374ba4334540beddba9e | types/fast-ratelimit/fast-ratelimit-tests.ts | types/fast-ratelimit/fast-ratelimit-tests.ts | import { FastRateLimit } from 'fast-ratelimit';
const limit = new FastRateLimit({ // $type: FastRateLimit
threshold: 20,
ttl: 60,
});
const someNamespace = 'some-namespace';
const consume = limit.consume(someNamespace); // $type: Promise<any>
consume.then(() => {}); // User can send message.... | import { FastRateLimit } from 'fast-ratelimit';
const limit = new FastRateLimit({ // $type: FastRateLimit
threshold: 20,
ttl: 60,
});
const someNamespace = 'some-namespace';
const consume = limit.consume(someNamespace); // $type: Promise<void>
consume.then(() => {}); // User can send message... | Correct expected promise type in fast-ratelimit test comments. | Correct expected promise type in fast-ratelimit test comments.
| TypeScript | mit | dsebastien/DefinitelyTyped,mcliment/DefinitelyTyped,dsebastien/DefinitelyTyped,borisyankov/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,georgemarshall/DefinitelyTyped,georgemarshall/DefinitelyTyped,borisyankov/DefinitelyTyped | ---
+++
@@ -7,11 +7,11 @@
const someNamespace = 'some-namespace';
-const consume = limit.consume(someNamespace); // $type: Promise<any>
+const consume = limit.consume(someNamespace); // $type: Promise<void>
consume.then(() => {}); // User can send message.
consume.catch(() => {}); ... |
7227ca7449fbfea85b662ef7847c2ba2f135d832 | packages/presentational-components/src/components/source.tsx | packages/presentational-components/src/components/source.tsx | import * as React from "react";
import Highlighter from "../syntax-highlighter";
export type SourceProps = {
language: string;
children: React.ReactNode[];
className: string;
theme: "light" | "dark";
};
export class Source extends React.Component<SourceProps> {
static defaultProps = {
children: "",
... | import * as React from "react";
import Highlighter from "../syntax-highlighter";
export type SourceProps = {
language: string;
children: React.ReactNode;
className: string;
theme: "light" | "dark";
};
export class Source extends React.Component<SourceProps> {
static defaultProps = {
children: "",
l... | Fix types for Source presentational component | Fix types for Source presentational component
| TypeScript | bsd-3-clause | nteract/nteract,nteract/composition,nteract/composition,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract,nteract/nteract | ---
+++
@@ -4,7 +4,7 @@
export type SourceProps = {
language: string;
- children: React.ReactNode[];
+ children: React.ReactNode;
className: string;
theme: "light" | "dark";
}; |
e12ae55aa7ab192b262a0c2ad4f017af1cc3c740 | src/client/VSTS/authMM.ts | src/client/VSTS/authMM.ts | import { Rest } from '../RestHelpers/rest';
/**
* interface for callback
* @interface IAuthStateCallback
*/
export interface IAuthStateCallback { (state: string): void; }
/**
* Connects to user database
* @class Auth
*/
export class Auth {
/**
* check user database for token associated with user email... | import { Rest } from '../RestHelpers/rest';
/**
* interface for callback
* @interface IAuthStateCallback
*/
export interface IAuthStateCallback { (state: string): void; }
/**
* Connects to user database
* @class Auth
*/
export class Auth {
/**
* check user database for token associated with user email... | Fix Auth issue in desktop | Fix Auth issue in desktop
| TypeScript | mit | annich-MS/OutlookVSTS,annich-MS/OutlookVSTS,annich-MS/OutlookVSTS | ---
+++
@@ -19,7 +19,7 @@
*/
public static getAuthState(callback: IAuthStateCallback): void {
Rest.getUser((user: string) => {
- $.get('./authenticate/db?user=' + user, (output) => {
+ $.get('./authenticate/db?user=' + user + '&trash=' + (Math.random() * 1000), (output) => {
... |
58defee7e6bbf1d85d0743c382d2c88d8db72eac | web-ng/src/app/components/project-header/project-header.component.ts | web-ng/src/app/components/project-header/project-header.component.ts | /**
* Copyright 2020 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... | /**
* Copyright 2020 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... | Disable auto focus when opening share dialog | Disable auto focus when opening share dialog
| TypeScript | apache-2.0 | google/ground-platform,google/ground-platform,google/ground-platform,google/ground-platform | ---
+++
@@ -38,6 +38,6 @@
}
private openShareDialog(): void {
- this.dialog.open(ShareDialogComponent);
+ this.dialog.open(ShareDialogComponent, { autoFocus: false });
}
} |
86e85fd0e0e69e887ca75c1d8ab3650d9b66e8d8 | types/get-caller-file/index.d.ts | types/get-caller-file/index.d.ts | // Type definitions for get-caller-file 1.0
// Project: https://github.com/stefanpenner/get-caller-file#readme
// Definitions by: Klaus Meinhardt <https://github.com/ajafff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function getCallerFile(position?: number): string;
declare namespace g... | // Type definitions for get-caller-file 1.0
// Project: https://github.com/stefanpenner/get-caller-file#readme
// Definitions by: Klaus Meinhardt <https://github.com/ajafff>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function getCallerFile(position?: number): string;
export = getCaller... | Remove namespace per review comment | Remove namespace per review comment
| TypeScript | mit | chrootsu/DefinitelyTyped,AgentME/DefinitelyTyped,arusakov/DefinitelyTyped,one-pieces/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,AgentME/DefinitelyTyped,dsebastien/DefinitelyTyped,rolandzwaga/DefinitelyTyped,laurentiustamate94/DefinitelyTyped,georgemarshall/DefinitelyTyped,dsebastien/Defi... | ---
+++
@@ -4,6 +4,5 @@
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function getCallerFile(position?: number): string;
-declare namespace getCallerFile {}
export = getCallerFile; |
7fc647fe64b53e2802e8950ce9a70c36b14c263c | app.ts | app.ts | export class App {
private _events: Object;
public start;
public h;
public createElement;
constructor() {
this._events = {};
}
on(name: string, fn: (...args) => void, options: any = {}) {
if (options.debug) console.debug('on: ' + name);
this._events[name] = this._events[name] || [];
thi... | import {Subject} from 'rxjs/Subject';
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/first';
import 'rxjs/add/operator/debounceTime';
export class App {
private subjects = {}
public start;
public h;
public createElement;
constructor() {
}
on(name: string, fn: Function, options: ... | Use RxJS for event pubsub | Use RxJS for event pubsub
| TypeScript | mit | yysun/apprun,yysun/apprun,yysun/apprun | ---
+++
@@ -1,44 +1,34 @@
+import {Subject} from 'rxjs/Subject';
+import {Observable} from 'rxjs/Observable';
+import 'rxjs/add/operator/first';
+import 'rxjs/add/operator/debounceTime';
+
export class App {
- private _events: Object;
+ private subjects = {}
public start;
public h;
public createElement;... |
b5dced02027577ac4ff5773290bfd5053da03280 | packages/stateful-components/__tests__/inputs/editor.spec.tsx | packages/stateful-components/__tests__/inputs/editor.spec.tsx | import { selectors } from "@nteract/core";
import { mockAppState } from "@nteract/fixtures";
import { makeMapStateToProps } from "../../src/inputs/editor";
describe("makeMapStateToProps", () => {
it("returns default values if input document is not a notebook", () => {
const state = mockAppState();
c... | import React from "react";
import { mount } from "enzyme";
import { selectors } from "@nteract/core";
import { mockAppState } from "@nteract/fixtures";
import { makeMapStateToProps, Editor } from "../../src/inputs/editor";
describe("makeMapStateToProps", () => {
it("returns default values if input documen... | Add tests for Editor stateful component | Add tests for Editor stateful component
| TypeScript | bsd-3-clause | nteract/nteract,nteract/nteract,nteract/composition,nteract/nteract,nteract/nteract,nteract/composition,nteract/composition,nteract/nteract | ---
+++
@@ -1,7 +1,10 @@
+import React from "react";
+import { mount } from "enzyme";
+
import { selectors } from "@nteract/core";
import { mockAppState } from "@nteract/fixtures";
-import { makeMapStateToProps } from "../../src/inputs/editor";
+import { makeMapStateToProps, Editor } from "../../src/inputs/editor... |
dd80f53b1f8bab81a7fc083ce486e2520df2f584 | console/src/app/core/models/chart/mongoose-chart-interface/mongoose-chart-options.ts | console/src/app/core/models/chart/mongoose-chart-interface/mongoose-chart-options.ts | export class MongooseChartOptions {
// NOTE: Fields are public since they should match ng-chart2 library naming
// link: https://github.com/valor-software/ng2-charts
public scaleShowVerticalLines: boolean = false;
public responsive: boolean = true;
public responsiveAnimationDuration: number = 0;
... | export class MongooseChartOptions {
// NOTE: Fields are public since they should match ng-chart2 library naming
// link: https://github.com/valor-software/ng2-charts
public scaleShowVerticalLines: boolean = false;
public responsive: boolean = true;
public responsiveAnimationDuration: number = 0;
... | Add logatirhmic scaling to Y axes on every chart. | Add logatirhmic scaling to Y axes on every chart.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -8,6 +8,11 @@
public animation: any = {
duration: 0
}
+ public scales: any = {
+ yAxes: [{
+ type: 'logarithmic'
+ }]
+ }
constructor(shouldScaleShowVerticalLines: boolean = false, isResponsive: boolean = true) {
this.scaleShowVerticalLines ... |
71a02408291654f5a810e7b6409a051b978bcbae | src/marketplace/offerings/service-providers/ServiceProvidersGrid.tsx | src/marketplace/offerings/service-providers/ServiceProvidersGrid.tsx | import { FunctionComponent, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { SERVICE_PROVIDERS_GRID } from '@waldur/marketplace/offerings/service-providers/constants';
import Grid from '@waldur/marketplace/offerings/service-providers/shared/grid/Grid';
import { ServiceProviderDetailsCard }... | import { FunctionComponent, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { SERVICE_PROVIDERS_GRID } from '@waldur/marketplace/offerings/service-providers/constants';
import Grid from '@waldur/marketplace/offerings/service-providers/shared/grid/Grid';
import { ServiceProviderDetailsCard }... | Use customer_keyword query param for filtering service-providers by name or abbreviation | Use customer_keyword query param for filtering service-providers by name or abbreviation
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -28,7 +28,7 @@
const GridOptions = {
table: SERVICE_PROVIDERS_GRID,
fetchData: createFetcher('marketplace-service-providers', ANONYMOUS_CONFIG),
- queryField: 'query',
+ queryField: 'customer_keyword',
};
export const ServiceProvidersGrid = connectTable(GridOptions)(GridComponent); |
bc3256d2e9622a640a0373f63f6155be120d49cb | index.d.ts | index.d.ts | // Copyright 2021 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 ... | // Copyright 2021 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 ... | Fix types for $ func | Fix types for $ func
| TypeScript | apache-2.0 | google/zx,google/zx | ---
+++
@@ -13,7 +13,7 @@
// limitations under the License.
interface $ {
- (pieces: TemplateStringsArray, ...args: string[]): Promise<ProcessOutput>
+ (pieces: TemplateStringsArray, ...args: any[]): Promise<ProcessOutput>
verbose: boolean
shell: string
cwd: string |
f010aec5620f5e339c35f3430b1cd438e3726d16 | src/lib/generate.ts | src/lib/generate.ts | import 'colors'
import path = require('path')
import ts = require('typescript')
import { LanguageService } from './language-service'
import { writeFile } from './file-util'
import { logEmitted, logError } from './logger'
export function generate (filenames: string[], options: ts.CompilerOptions): Promise<never> {
c... | import 'colors'
import path = require('path')
import ts = require('typescript')
import { LanguageService } from './language-service'
import { writeFile } from './file-util'
import { logEmitted, logError } from './logger'
export function generate (filenames: string[], options: ts.CompilerOptions): Promise<never> {
c... | Print errors that is specific when declaration: true | Print errors that is specific when declaration: true
| TypeScript | mit | ktsn/vuetype,ktsn/vuetype | ---
+++
@@ -14,6 +14,7 @@
// Should not emit if some errors are occurred
const service = new LanguageService(vueFiles, {
...options,
+ declaration: true,
noEmitOnError: true
})
|
9a783c27e74169e85cc6d1974d0ab09f0c52b80d | code-samples/Angular6/chapter14/ng-auction/client/e2e/search.e2e-spec.ts | code-samples/Angular6/chapter14/ng-auction/client/e2e/search.e2e-spec.ts | import { SearchPage } from './search.po';
import {browser} from 'protractor';
describe('ngAuction search', () => {
let searchPage: SearchPage;
beforeEach(() => {
searchPage = new SearchPage();
});
it('should perform the search for products that cost from $10 to $100', () => {
searchPage.navigateToLa... | import { SearchPage } from './search.po';
import {browser} from 'protractor';
describe('ngAuction search', () => {
let searchPage: SearchPage;
beforeEach(() => {
searchPage = new SearchPage();
});
it('should perform the search for products that cost from $10 to $100', async () => {
searchPage.navigat... | Fix e2e test in ch14 | Fix e2e test in ch14
| TypeScript | mit | Farata/angulartypescript,Farata/angulartypescript,Farata/angulartypescript | ---
+++
@@ -8,16 +8,16 @@
searchPage = new SearchPage();
});
- it('should perform the search for products that cost from $10 to $100', () => {
+ it('should perform the search for products that cost from $10 to $100', async () => {
searchPage.navigateToLandingPage();
- let url = browser.getCurren... |
5617f1bac1cc33055ef4854591a5513858493157 | packages/@sanity/field/src/types/reference/diff/ReferenceFieldDiff.tsx | packages/@sanity/field/src/types/reference/diff/ReferenceFieldDiff.tsx | import React from 'react'
import {DiffComponent, ReferenceDiff} from '../../../diff'
import {Change} from '../../../diff/components'
import {ReferencePreview} from '../preview/ReferencePreview'
export const ReferenceFieldDiff: DiffComponent<ReferenceDiff> = ({diff, schemaType}) => {
return (
<Change
previe... | import React from 'react'
import {DiffComponent, ReferenceDiff} from '../../../diff'
import {Change} from '../../../diff/components'
import {ReferencePreview} from '../preview/ReferencePreview'
export const ReferenceFieldDiff: DiffComponent<ReferenceDiff> = ({diff, schemaType}) => {
return (
<Change
diff={... | Use grid layout for reference changes | [field] Use grid layout for reference changes
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -6,10 +6,10 @@
export const ReferenceFieldDiff: DiffComponent<ReferenceDiff> = ({diff, schemaType}) => {
return (
<Change
+ diff={diff}
+ layout="grid"
+ path="_ref"
previewComponent={ReferencePreview}
- layout={diff.fromValue && diff.toValue ? 'grid' : 'inline'}
- ... |
60d1d112cfcb958e99369d06eba8aea1148c8444 | src/wrapped_native_key.ts | src/wrapped_native_key.ts |
import { NativeCryptoKey } from "webcrypto-core";
import { CryptoKey } from "./key";
export class WrappedNativeCryptoKey extends CryptoKey {
constructor(
algorithm: KeyAlgorithm,
extractable: boolean,
type: KeyType,
usages: KeyUsage[],
public nativeKey: NativeCryptoKey) {
super(algorithm, e... |
import { NativeCryptoKey } from "webcrypto-core";
import { CryptoKey } from "./key";
export class WrappedNativeCryptoKey extends CryptoKey {
// tslint:disable-next-line: member-access
#nativeKey: CryptoKey;
constructor(
algorithm: KeyAlgorithm,
extractable: boolean,
type: KeyType,
usages: KeyU... | Move nativeKey to private field | chore: Move nativeKey to private field
| TypeScript | mit | PeculiarVentures/webcrypto-liner,PeculiarVentures/webcrypto-liner | ---
+++
@@ -4,13 +4,22 @@
export class WrappedNativeCryptoKey extends CryptoKey {
+ // tslint:disable-next-line: member-access
+ #nativeKey: CryptoKey;
+
constructor(
algorithm: KeyAlgorithm,
extractable: boolean,
type: KeyType,
usages: KeyUsage[],
- public nativeKey: NativeCryptoKey)... |
816ff80db7d51f79009d67635541bac32451afa1 | src/front-end/js/directory/modules/geocoder.module.ts | src/front-end/js/directory/modules/geocoder.module.ts | declare let google;
import { Event, IEvent } from "../utils/event";
export class GeocoderModule
{
onResult = new Event<any>();
geocodeAddress( address, callbackComplete?, callbackFail? ) {
console.log("geocode address : ", address);
let geocoder = new google.maps.Geocoder();
geocoder.geocode( { 'address': ... | declare let GeocoderJS;
declare let App : AppModule;
declare var L;
import { AppModule } from "../app.module";
import { Event, IEvent } from "../utils/event";
export class GeocodeResult
{
}
export class GeocoderModule
{
onResult = new Event<any>();
geocoder : any = null;
geocoderOSM : any = null;
constructor(... | Change google geocoder to geocoder-js | Change google geocoder to geocoder-js | TypeScript | mit | Biopenlandes/PagesVertes,Biopenlandes/PagesVertes,Biopenlandes/PagesVertes | ---
+++
@@ -1,25 +1,44 @@
-declare let google;
+declare let GeocoderJS;
+declare let App : AppModule;
+declare var L;
+import { AppModule } from "../app.module";
import { Event, IEvent } from "../utils/event";
+
+export class GeocodeResult
+{
+
+}
export class GeocoderModule
{
onResult = new Event<any>();
+ ... |
5a32a070c4ea6852d40fcdb55afa78cd7f0fa1ff | examples/react-babel-allowjs/src/main.tsx | examples/react-babel-allowjs/src/main.tsx | import React from 'react';
import ReactDOM from 'react-dom';
import App from './app.js';
ReactDOM.render(
<App />,
document.getElementById('appContainer')
);
console.log(App) | import React from 'react';
import ReactDOM from 'react-dom';
import App from './app.js';
function getContainer (id: string) {
return document.getElementById(id)
}
ReactDOM.render(
<App />,
getContainer('appContainer')
); | Update example to actually include some typed code | Update example to actually include some typed code
| TypeScript | mit | TypeStrong/ts-loader,jbrantly/ts-loader,jbrantly/ts-loader,jbrantly/ts-loader,TypeStrong/ts-loader | ---
+++
@@ -2,8 +2,11 @@
import ReactDOM from 'react-dom';
import App from './app.js';
+function getContainer (id: string) {
+ return document.getElementById(id)
+}
+
ReactDOM.render(
<App />,
- document.getElementById('appContainer')
+ getContainer('appContainer')
);
-console.log(App) |
83e3632b527bd5bf7451e7c29257cef702b2fe9b | demo/app/color-selector/color-selector-demo.ts | demo/app/color-selector/color-selector-demo.ts | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import {... | /*
* @license
* Copyright Hôpitaux Universitaires de Genève. All Rights Reserved.
*
* Use of this source code is governed by an Apache-2.0 license that can be
* found in the LICENSE file at https://github.com/DSI-HUG/dejajs-components/blob/master/LICENSE
*/
import { Component } from '@angular/core';
import {... | Change colors to see a problem more quickly | quiet(DejaColorSelector): Change colors to see a problem more quickly
| TypeScript | apache-2.0 | DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components,DSI-HUG/dejajs-components | ---
+++
@@ -19,8 +19,8 @@
export class DejaColorSelectorDemoComponent {
public tabIndex = 1;
- protected selectedColor = Color.fromHex('#FFA000');
- protected invalidColor = Color.fromHex('#FFA012');
+ protected selectedColor = Color.fromHex('#25C337');
+ protected invalidColor = Color.fromHex('#D... |
8a3efe03b8e6a84005e24d88450cb8eb8ee320d9 | jSlider/JSliderOptions.ts | jSlider/JSliderOptions.ts | module jSlider {
export class JSliderOptions {
private static _defaults = {
"delay" : 4000, //Delay between each slide
"duration" : 200, //The duration of the slide animation
"button" : {}
};
private options : Object = {
"delay" : null,
"duration" : null,
"button" : {
"next" : null,
... | module jSlider {
export class JSliderOptions {
private options : Object = {
"delay" : 4000,
"duration" : 200,
"button" : {
"next" : null,
"prev" : null,
"stop" : null,
"start" : null
},
"on" : {
"slide" : [],
"next" : [],
"prev" : [],
"start" : [],
"stop" : []
}
... | Remove the ever so poinless _defaults object, and fix the event object | Remove the ever so poinless _defaults object, and fix the event object
| TypeScript | lgpl-2.1 | sigurdsvela/JSlider | ---
+++
@@ -1,14 +1,8 @@
module jSlider {
export class JSliderOptions {
- private static _defaults = {
- "delay" : 4000, //Delay between each slide
- "duration" : 200, //The duration of the slide animation
- "button" : {}
- };
-
private options : Object = {
- "delay" : null,
- "duration" : null,
+... |
3f280d297b548c6108602d1f4069808c8aafe9fa | knockoutapp/app/services/utils.ts | knockoutapp/app/services/utils.ts | /**
* Created by rtorres on 9/25/16.
*/
export function getCookie(cname: string): string {
let name: string = cname + '=';
let ca: string[] = document.cookie.split(';');
for(var i = 0; i <ca.length; i++) {
let c: any = ca[i];
while (c.charAt(0)==' ') {
c = c.substring(1);
... | /**
* Created by rtorres on 9/25/16.
*/
import * as Cookies from 'js-cookie';
export function getCookie(cname: string): string {
return Cookies.get(cname);
} | Use js-cookies to get cookie | Use js-cookies to get cookie
| TypeScript | mit | rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel,rafasis1986/EngineeringMidLevel | ---
+++
@@ -1,19 +1,8 @@
/**
* Created by rtorres on 9/25/16.
*/
-
+import * as Cookies from 'js-cookie';
export function getCookie(cname: string): string {
- let name: string = cname + '=';
- let ca: string[] = document.cookie.split(';');
- for(var i = 0; i <ca.length; i++) {
- let c: any = c... |
0d502b78d4916fe983aba6bee0be66b55951a62f | applications/drive/src/app/components/sections/SharedLinks/ContextMenuButtons/StopSharingButton.tsx | applications/drive/src/app/components/sections/SharedLinks/ContextMenuButtons/StopSharingButton.tsx | import { c } from 'ttag';
import useToolbarActions from '../../../../hooks/drive/useActions';
import { FileBrowserItem } from '../../../FileBrowser';
import { ContextMenuButton } from '../../ContextMenu';
interface Props {
shareId: string;
items: FileBrowserItem[];
close: () => void;
}
const StopSharingB... | import { c } from 'ttag';
import useToolbarActions from '../../../../hooks/drive/useActions';
import { FileBrowserItem } from '../../../FileBrowser';
import { ContextMenuButton } from '../../ContextMenu';
interface Props {
shareId: string;
items: FileBrowserItem[];
close: () => void;
}
const StopSharingB... | Fix icon name for stop sharing context menu | Fix icon name for stop sharing context menu | TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -16,7 +16,7 @@
return (
<ContextMenuButton
name={c('Action').t`Stop sharing`}
- icon="broken-link"
+ icon="link-broken"
testId="context-menu-stop-sharing"
action={() => openStopSharing(shareId, items)}
close={close} |
b732c0ce444728b4d0f2386f34784741414d921d | packages/@glimmer/component/addon/-private/base-component-manager.ts | packages/@glimmer/component/addon/-private/base-component-manager.ts | import { DEBUG } from '@glimmer/env';
import { ComponentManager, ComponentCapabilities, TemplateArgs } from '@glimmer/core';
import BaseComponent, { ARGS_SET } from './component';
export interface Constructor<T> {
new (owner: unknown, args: Record<string, unknown>): T;
}
export default abstract class BaseComponentM... | import { DEBUG } from '@glimmer/env';
import { ComponentManager, ComponentCapabilities } from '@glimmer/core';
import { Arguments } from '@glimmer/interfaces';
import BaseComponent, { ARGS_SET } from './component';
export interface Constructor<T> {
new (owner: unknown, args: Record<string, unknown>): T;
}
export de... | Fix type errors on canary | Fix type errors on canary
| TypeScript | mit | glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js,glimmerjs/glimmer.js | ---
+++
@@ -1,5 +1,6 @@
import { DEBUG } from '@glimmer/env';
-import { ComponentManager, ComponentCapabilities, TemplateArgs } from '@glimmer/core';
+import { ComponentManager, ComponentCapabilities } from '@glimmer/core';
+import { Arguments } from '@glimmer/interfaces';
import BaseComponent, { ARGS_SET } from '.... |
438a578cfb20b3debdeec7ca762731db8b60033a | src/tests/definitions/interface/interfaceWriteTests.ts | src/tests/definitions/interface/interfaceWriteTests.ts | import * as assert from "assert";
import {getInfoFromString} from "./../../../main";
const code =
`interface MyInterface {
myString: string;
mySecond: number;
myMethod(): void;
myMethodWithTypeParameter<T>(): void;
myMethod2<T>(): string;
myMethod2<T>(str?: string): string;
}
interface NewSi... | import * as assert from "assert";
import {getInfoFromString} from "./../../../main";
const code =
`interface SimpleInterface {
}
interface MyInterface {
myString: string;
mySecond: number;
myMethod(): void;
myMethodWithTypeParameter<T>(): void;
myMethod2<T>(): string;
myMethod2<T>(str?: stri... | Add tests for InterfaceDefinition -> write. | Add tests for InterfaceDefinition -> write.
| TypeScript | mit | dsherret/ts-type-info,dsherret/type-info-ts,dsherret/ts-type-info,dsherret/type-info-ts | ---
+++
@@ -2,7 +2,10 @@
import {getInfoFromString} from "./../../../main";
const code =
-`interface MyInterface {
+`interface SimpleInterface {
+}
+
+interface MyInterface {
myString: string;
mySecond: number;
@@ -45,5 +48,13 @@
it("should have the same output as the input", () => {
... |
7dd4f72ed23bf2d0806f192614225e8b09a473e4 | extraterm/src/render_process/settings/extensions/ExtensionSettingsUi.ts | extraterm/src/render_process/settings/extensions/ExtensionSettingsUi.ts | /*
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import Component from 'vue-class-component';
import Vue from 'vue';
import { } from '../../../Config';
import { trimBetweenTags } from 'extraterm-trim-between... | /*
* Copyright 2020 Simon Edwards <simon@simonzone.com>
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import Component from 'vue-class-component';
import Vue from 'vue';
import { } from '../../../Config';
import { trimBetweenTags } from 'extraterm-trim-between... | Hide internal extensions from the settings page | Hide internal extensions from the settings page
| TypeScript | mit | sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm,sedwards2009/extraterm | ---
+++
@@ -9,6 +9,7 @@
import { } from '../../../Config';
import { trimBetweenTags } from 'extraterm-trim-between-tags';
import { ExtensionMetadata } from 'extraterm/src/ExtensionMetadata';
+import { isSupportedOnThisPlatform } from '../../extension/InternalTypes';
@Component(
@@ -17,7 +18,7 @@
<div class="... |
12e888b4668a250e00f9a30ed8d5856d0f76c66b | components/captcha.ts | components/captcha.ts | import {
Component,
OnInit,
Input,
Output,
EventEmitter,
NgZone} from '@angular/core';
@Component({
selector: 're-captcha',
template: '<div class="g-recaptcha" [attr.data-sitekey]="site_key" data-callback="verifyCallback"></div>'
})
/*Captcha functionality component*/
export class ReCa... | import {
Component,
OnInit,
Input,
Output,
EventEmitter,
NgZone} from '@angular/core';
@Component({
selector: 're-captcha',
template: '<div class="g-recaptcha" [attr.data-sitekey]="site_key" data-callback="verifyCallback"></div>'
})
export class ReCaptchaComponent implements OnInit {
... | Support user interface language input parameter | Support user interface language input parameter | TypeScript | isc | xmaestro/angular2-recaptcha | ---
+++
@@ -11,14 +11,16 @@
template: '<div class="g-recaptcha" [attr.data-sitekey]="site_key" data-callback="verifyCallback"></div>'
})
-/*Captcha functionality component*/
export class ReCaptchaComponent implements OnInit {
@Input()
- site_key:string = null;
+ site_key: string = null;
+ /* ... |
5f4c1e977c92268f9e3a01e2560f06e6f29e9024 | src/app/map/suitability-map-panel/suitability-map-panel.component.spec.ts | src/app/map/suitability-map-panel/suitability-map-panel.component.spec.ts | /* tslint:disable:no-unused-variable */
/*!
* Suitability Map Panel Component Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { Renderer } from '@angular/core';
import { TestBed, async, inject } from '@angular/core/testing';
import { Router } from '@angular... | /* tslint:disable:no-unused-variable */
/*!
* Suitability Map Panel Component Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { Renderer } from '@angular/core';
import { TestBed, async, inject } from '@angular/core/testing';
import { Router } from '@angular... | Fix syntax error due to missing comma | Fix syntax error due to missing comma
| TypeScript | mit | ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps | ---
+++
@@ -30,7 +30,7 @@
LeafletMapService,
SuitabilityMapPanelComponent,
- { provide: SuitabilityMapService, useClass: MockSuitabilityMapService }
+ { provide: SuitabilityMapService, useClass: MockSuitabilityMapService },
{ provide: Router, useValue: mockRouter },
... |
3113a24cf7e9ff34a03977b90cadcd544369ff0a | src/charts/ParallelCoordinates.ts | src/charts/ParallelCoordinates.ts | import Chart from './Chart';
import SvgStrategyParallelCoordinates from '../svg/strategies/SvgStrategyParallelCoordinates';
import { defaults } from '../utils/defaults/parallelCoordinates';
import { copy, isValuesInObjectKeys } from '../utils/functions';
class ParallelCoordinates extends Chart {
constructor(data:... | import Chart from './Chart';
import SvgStrategyParallelCoordinates from '../svg/strategies/SvgStrategyParallelCoordinates';
import { defaults } from '../utils/defaults/parallelCoordinates';
import { copy, isValuesInObjectKeys } from '../utils/functions';
class ParallelCoordinates extends Chart {
constructor(data:... | Add data type check whether array or not in Parallel Coordinates | Add data type check whether array or not in Parallel Coordinates
| TypeScript | apache-2.0 | proteus-h2020/proteic,proteus-h2020/proteic,proteus-h2020/proteus-charts,proteus-h2020/proteic | ---
+++
@@ -16,8 +16,12 @@
public keepDrawing(datum: any) {
let pause: boolean = this.config.get('pause');
-
- this.data = datum;
+
+ if (!Array.isArray(datum)) {
+ this.data = [datum];
+ } else {
+ this.data = datum;
+ }
if (pause) ... |
aff211820893c81d0768931ea2b9d9592919dc85 | src/models/requestParserFactory.ts | src/models/requestParserFactory.ts | "use strict";
import { IRequestParser } from '../models/IRequestParser';
import { CurlRequestParser } from '../utils/curlRequestParser';
import { HttpRequestParser } from '../utils/httpRequestParser';
export interface IRequestParserFactory {
createRequestParser(rawHttpRequest: string);
}
export class R... | "use strict";
import { IRequestParser } from '../models/IRequestParser';
import { CurlRequestParser } from '../utils/curlRequestParser';
import { HttpRequestParser } from '../utils/httpRequestParser';
export interface IRequestParserFactory {
createRequestParser(rawHttpRequest: string);
}
export class R... | Update the way to check curl request | Update the way to check curl request
| TypeScript | mit | Huachao/vscode-restclient,Huachao/vscode-restclient | ---
+++
@@ -9,8 +9,11 @@
}
export class RequestParserFactory implements IRequestParserFactory {
+
+ private static readonly curlRegex: RegExp = /^\s*curl/i;
+
public createRequestParser(rawHttpRequest: string): IRequestParser {
- if (rawHttpRequest.trim().toLowerCase().startsWith('curl'.toLowerCase... |
9baa8767b7f2069131b577eca2a0eedb61adf58a | src/reactors/make-upload-button.ts | src/reactors/make-upload-button.ts | import { fileSize } from "../format/filesize";
import platformData from "../constants/platform-data";
import { DateTimeField, toDateTimeField } from "../db/datetime-field";
import { IUpload, ILocalizedString, IModalButtonTag } from "../types";
interface IUploadButton {
label: ILocalizedString;
tags: IModalButton... | import { fileSize } from "../format/filesize";
import platformData from "../constants/platform-data";
import { DateTimeField, toDateTimeField } from "../db/datetime-field";
import { IUpload, ILocalizedString, IModalButtonTag } from "../types";
interface IUploadButton {
label: ILocalizedString;
tags: IModalButton... | Use html5 icon instead of earth icon for html5 uploads | Use html5 icon instead of earth icon for html5 uploads
| TypeScript | mit | itchio/itchio-app,itchio/itch,itchio/itch,itchio/itch,leafo/itchio-app,leafo/itchio-app,itchio/itchio-app,itchio/itch,leafo/itchio-app,itchio/itch,itchio/itch,itchio/itchio-app | ---
+++
@@ -40,7 +40,7 @@
if (upload.type === "html") {
tags.push({
- icon: "earth",
+ icon: "html5",
});
}
|
f66f5fcc6d74ebc2b4100afe35f69cac04f19376 | src/datasets/types.ts | src/datasets/types.ts | import { DataCube } from 'src/models/data-cube/data-cube.model';
export interface Dataset {
metas: Array<Meta>;
dataCube: DataCube;
}
export type Meta = TabbedChartsMeta | ChartMeta;
export interface ComponentMeta<T extends string> {
type: T;
title: string;
}
export interface DataComponentMet... | import { DataCube } from 'src/models/data-cube/data-cube.model';
export interface Dataset {
metas: Array<Meta>;
dataCube: DataCube;
}
export type Meta = TabbedChartsMeta | ChartMeta;
export interface ComponentMeta<T extends string> {
type: T;
title: string;
}
export interface DataComponentMet... | Remove unnecessary parent type of TabbedChartsMeta | Remove unnecessary parent type of TabbedChartsMeta
| TypeScript | apache-2.0 | googleinterns/guide-doge,googleinterns/guide-doge,googleinterns/guide-doge | ---
+++
@@ -16,11 +16,9 @@
query: QueryT;
}
-export interface ContainerComponentMeta<T extends string, MetaT> extends ComponentMeta<T> {
- metas: MetaT;
+export interface TabbedChartsMeta extends ComponentMeta<'tabbed'> {
+ metas: ChartMeta[];
}
-
-export type TabbedChartsMeta = ContainerComponentMeta<'tabbe... |
6d222f60cb1be7133bef19386a85e5a31c498be8 | test/testRunner.ts | test/testRunner.ts | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import * as glob from "glob";
import * as Mocha from "mocha";
import * as path from "path";
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: "tdd", // the TDD UI is being use... | // Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import * as glob from "glob";
import * as Mocha from "mocha";
import * as path from "path";
export function run(): Promise<void> {
// Create the mocha test
const mocha = new Mocha({
ui: "tdd", // the TDD UI is being use... | Fix deprecated use of `mocha` | Fix deprecated use of `mocha`
The `useColors` option was replaced with `color`.
| TypeScript | mit | PowerShell/vscode-powershell | ---
+++
@@ -9,7 +9,7 @@
// Create the mocha test
const mocha = new Mocha({
ui: "tdd", // the TDD UI is being used in extension.test.ts (suite, test, etc.)
- useColors: !process.env.TF_BUILD, // colored output from test results
+ color: !process.env.TF_BUILD, // colored output ... |
a4adde6f536b8498e1495768ee3c51c97cef649a | src/shadowbox/model/access_key.ts | src/shadowbox/model/access_key.ts |
// Copyright 2018 The Outline Authors
//
// 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 agr... | // Copyright 2018 The Outline Authors
//
// 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 agre... | Remove blank line at the top | Remove blank line at the top
| TypeScript | apache-2.0 | Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server,Jigsaw-Code/outline-server | ---
+++
@@ -1,4 +1,3 @@
-
// Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License"); |
de9a5b71173e0fd9485387c1ed936a5ebba77dfb | src/types/future.d.ts | src/types/future.d.ts | /**
* This file is part of Threema Web.
*
* Threema Web is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* This program... | /**
* This file is part of Threema Web.
*
* Threema Web is free software: you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or (at
* your option) any later version.
*
* This program... | Fix let FutureStatic inherit from PromiseConstructor | Fix let FutureStatic inherit from PromiseConstructor
| TypeScript | agpl-3.0 | threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web,threema-ch/threema-web | ---
+++
@@ -36,7 +36,7 @@
reject(reason?: any): void;
}
-interface FutureStatic {
+interface FutureStatic extends PromiseConstructor {
new<T>(executor?: (resolveFn: (value?: T | PromiseLike<T>) => void,
rejectFn: (reason?: any) => void) => void,
): Future<T> |
a23747f415b9d926025d4789d09bd6a0c5b8a2e7 | lib/jsonparser.ts | lib/jsonparser.ts | import epcis = require('./epcisevents');
export module EPCIS {
export class EpcisJsonParser {
constructor() {}
static parseObj(obj: Object) : epcis.EPCIS.EpcisEvent {
if(EpcisJsonParser.isEvent(obj)) {
if(obj['type'] === 'AggregationEvent') {
var agg = new epcis.EPCIS.AggregationEvent();
agg.load... | import epcis = require('./epcisevents');
export module EPCIS {
export class EpcisJsonParser {
constructor() {}
static parseObj(obj: Object) : epcis.EPCIS.EpcisEvent {
if(EpcisJsonParser.isEvent(obj)) {
if(obj['type'] === 'AggregationEvent') {
var agg = epcis.EPCIS.AggregationEvent.loadFromObj(obj);
... | Use new static parser functions | Use new static parser functions
| TypeScript | mit | matgnt/epcis-js,matgnt/epcis-js | ---
+++
@@ -6,20 +6,18 @@
static parseObj(obj: Object) : epcis.EPCIS.EpcisEvent {
if(EpcisJsonParser.isEvent(obj)) {
if(obj['type'] === 'AggregationEvent') {
- var agg = new epcis.EPCIS.AggregationEvent();
- agg.loadFromObj(obj);
+ var agg = epcis.EPCIS.AggregationEvent.loadFromObj(obj);
... |
e52551931440101f6204151d6f8ae165bb3b7559 | ui/src/Project.tsx | ui/src/Project.tsx | import React, { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { search } from './search';
import DocumentTeaser from './DocumentTeaser';
import { Container, Row, Col } from 'react-bootstrap';
import DocumentDetails from './DocumentDetails';
export default () => {
const {... | import React, { useState, useEffect } from 'react';
import { useParams } from 'react-router-dom';
import { search } from './search';
import DocumentTeaser from './DocumentTeaser';
import { Container, Row, Col } from 'react-bootstrap';
import DocumentDetails from './DocumentDetails';
export default () => {
const {... | Use document teaser for project metadata | Use document teaser for project metadata
| TypeScript | apache-2.0 | dainst/idai-field-web,dainst/idai-field-web,dainst/idai-field-web | ---
+++
@@ -20,8 +20,8 @@
return (
<Container fluid>
<Row>
- <Col sm={ 4 }>
- { renderProjectDocument(projectDocument) }
+ <Col sm={ 3 }>
+ { renderProjectTeaser(projectDocument) }
</Col>
<... |
8207d65c2228ecd75142f1e160c7028959069db9 | src/event/Event.ts | src/event/Event.ts | import { Client } from '../client/Client';
/**
* Method to be implemented that will be executed whenever the event this handler
* is for is emitted by the Client
* @abstact
* @method Event#action
* @param {any[]} args - The args your event handler will be receiving
* from the event it handles
* @returns ... | import { Client } from '../client/Client';
/**
* Method to be implemented that will be executed whenever the event this handler
* is for is emitted by the Client
* @abstact
* @method Event#action
* @param {any[]} ...args - The args your event handler will be receiving
* from the event it handles
* @retur... | Test how jsdoc will render rest args | Test how jsdoc will render rest args
Because I just realized I'm not aware of anywhere I'm using them in the docs | TypeScript | mit | zajrik/yamdbf,zajrik/yamdbf | ---
+++
@@ -5,7 +5,7 @@
* is for is emitted by the Client
* @abstact
* @method Event#action
- * @param {any[]} args - The args your event handler will be receiving
+ * @param {any[]} ...args - The args your event handler will be receiving
* from the event it handles
* @returns {void}
*/ |
5a28fe0242ed53c7df77b53302dcfe43c84dca9f | jovo-clients/jovo-client-web-vue/src/index.ts | jovo-clients/jovo-client-web-vue/src/index.ts | import { Client, Config, DeepPartial } from 'jovo-client-web';
import { PluginObject } from 'vue';
declare module 'vue/types/vue' {
interface Vue {
$client: Client;
}
}
export interface JovoWebClientVueConfig {
url: string;
client?: DeepPartial<Config>;
}
const plugin: PluginObject<JovoWebClientVueConfig... | import { Client, Config, DeepPartial } from 'jovo-client-web';
import { PluginObject } from 'vue';
declare module 'vue/types/vue' {
interface Vue {
$client: Client;
}
}
export interface JovoWebClientVueConfig {
url: string;
client?: DeepPartial<Config>;
}
const plugin: PluginObject<JovoWebClientVueConfig... | Make Client reactive and add check if url is set in config | :sparkles: Make Client reactive and add check if url is set in config
| TypeScript | apache-2.0 | jovotech/jovo-framework-nodejs,jovotech/jovo-framework-nodejs | ---
+++
@@ -14,12 +14,14 @@
const plugin: PluginObject<JovoWebClientVueConfig> = {
install: (vue, config) => {
- if (!config) {
+ if (!config?.url) {
throw new Error(
`At least the 'url' option has to be set in order to use the JovoWebClientPlugin. `,
);
}
- vue.prototype.$c... |
f69ce2593842b7f9d5e99f78d3b575e3982b3094 | src/HttpContainer.ts | src/HttpContainer.ts | import { Controllers, Controller, HttpController } from './decorators/Controller';
import { IHttpMethod, HttpMethods, HttpGet, HttpPost, HttpPut, HttpDelete } from './decorators/HttpMethod';
import * as express from 'express';
export class HttpContainer {
constructor() {}
register (router: express.Router) {
... | import { Controllers, Controller, HttpController } from './decorators/Controller';
import { IHttpMethod, HttpMethods, HttpGet, HttpPost, HttpPut, HttpDelete } from './decorators/HttpMethod';
import * as express from 'express';
export class HttpContainer {
constructor() {}
register (router: express.Router) {
... | Use forEach instead of 'for in' | Use forEach instead of 'for in'
| TypeScript | mit | mborders/restorator | ---
+++
@@ -10,15 +10,11 @@
const controllers: HttpController[] = Controllers;
const decorators: IHttpMethod[] = HttpMethods;
- for (let i in decorators) {
- const decorator: IHttpMethod = decorators[i];
-
- for (let j in controllers) {
- const controller: HttpController = contro... |
f7fb5e59325f7f4fb670d92d5fe68be38255ccd6 | applications/mail/src/app/components/message/extras/ExtraDecryptedSubject.tsx | applications/mail/src/app/components/message/extras/ExtraDecryptedSubject.tsx | import React from 'react';
import { Icon, Tooltip } from 'react-components';
import { c } from 'ttag';
import { MessageExtended } from '../../../models/message';
interface Props {
message: MessageExtended;
}
const ExtraDecryptedSubject = ({ message }: Props) => {
if (!message.decryptedSubject) {
retu... | import React from 'react';
import { Icon, Tooltip } from 'react-components';
import { c } from 'ttag';
import { MessageExtended } from '../../../models/message';
interface Props {
message: MessageExtended;
}
const ExtraDecryptedSubject = ({ message }: Props) => {
if (!message.decryptedSubject) {
retu... | Fix icon alignment for encrpyted subject | [MAILWEB-1791] Fix icon alignment for encrpyted subject
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -16,7 +16,7 @@
return (
<div className="bg-white-dm rounded bordered-container p0-5 mb0-5 flex flex-nowrap flex-items-center flex-spacebetween">
<div className="flex">
- <Tooltip title={c('Info').t`Subject is end-to-end encrypted`}>
+ <Tooltip classN... |
9c3e2db094d06ddc4a7dc3c8a9de899140e4ff7d | packages/core/src/store.ts | packages/core/src/store.ts | import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data: any;
schema?: JsonSchema;
uischema?: UISche... | import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
import { ValidationState } from './reducers/validation';
export interface JsonFormsStore extends Store<any> {
}
export interface JsonFormsState {
jsonforms: {
common: {
data... | Add validationState to JsonFormsState type | Add validationState to JsonFormsState type
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | ---
+++
@@ -1,6 +1,7 @@
import { Store } from 'redux';
import { JsonSchema } from './models/jsonSchema';
import { UISchemaElement } from './models/uischema';
+import { ValidationState } from './reducers/validation';
export interface JsonFormsStore extends Store<any> {
}
@@ -11,6 +12,7 @@
schema?: JsonSc... |
8c8057b657d725417748b4a89174006ea3acbc15 | src/utils/index.ts | src/utils/index.ts | import { Grid, Row, Column, Diagonal } from '../definitions';
export function getRows(grid: Grid): Row[] {
const length = Math.sqrt(grid.length);
const copy = grid.concat([]);
return getArray(length).map(() => copy.splice(0, length));
}
export function getColumns(grid: Grid): Column[] {
return getRows(transpo... | import { Grid, Row, Column, Diagonal } from '../definitions';
export function getRows(grid: Grid): Row[] {
const length = Math.sqrt(grid.length);
const copy = grid.concat([]);
return getArray(length).map(() => copy.splice(0, length));
}
export function getColumns(grid: Grid): Column[] {
return getRows(transpo... | Convert imperative code to declarative code | Convert imperative code to declarative code
| TypeScript | mit | artfuldev/tictactoe-ai,artfuldev/tictactoe-ai | ---
+++
@@ -21,11 +21,5 @@
export function transpose<T>(grid: Array<T>): Array<T> {
const size = Math.sqrt(grid.length);
- const transposed = grid.filter(() => false);
- for (let j = 0; j < size; ++j) {
- for (let i = 0; i < size; ++i) {
- transposed.push(grid[j + (i * size)]);
- }
... |
12f638a0eb1fcdf6276488248b3d4678da283138 | src/app/add-assignment/add-assignment.component.spec.ts | src/app/add-assignment/add-assignment.component.spec.ts | import {
beforeEachProviders,
describe,
inject,
it
} from '@angular/core/testing';
import { AddAssignmentComponent } from './add-assignment.component';
describe('AddAssignmentComponent', () => {
beforeEachProviders(() => [
AddAssignmentComponent
]);
let component: AddAssignmentComponent;
beforeE... | import {
beforeEachProviders,
describe,
inject,
it
} from '@angular/core/testing';
import { AddAssignmentComponent } from './add-assignment.component';
describe('AddAssignmentComponent', () => {
beforeEachProviders(() => [
AddAssignmentComponent
]);
let component: AddAssignmentComponent;
beforeE... | Add tests for changePossibleAnswers in add-assignment component | Add tests for changePossibleAnswers in add-assignment component
| TypeScript | mit | bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder | ---
+++
@@ -29,4 +29,52 @@
component.closeModal();
});
+
+ it('there should be no possible answers if numOfAnswersPerQuestion is 0', () => {
+ component.numAnswersPerQuestion = 0;
+
+ component.changePossibleAnswers();
+
+ expect(component.possibleAnswers).toEqual([]);
+ });
+
+ it('possible ans... |
d2f1e052f6379d799b57831e8a0847d181153188 | src/db/repositories/postRepository.ts | src/db/repositories/postRepository.ts | import {Id} from '../types'
import {isObjectId} from '../helpers'
import Post, {DbPost, UpsertPost} from '../models/Post'
export const findPostById = async (id: Id): Promise<DbPost> => {
return isObjectId(id) ? await Post.findById(id) : undefined
}
export const upsertPost = async (payload: UpsertPost): Promise<DbPo... | import {Id} from '../types'
import {isObjectId} from '../helpers'
import Post, {DbPost, UpsertPost} from '../models/Post'
export const findPostById = async (id: Id): Promise<DbPost|undefined> => {
return isObjectId(id) ? await Post.findById(id) : undefined
}
export const upsertPost = async (payload: UpsertPost): Pr... | Annotate resolved value as nullable | Annotate resolved value as nullable
| TypeScript | mit | ericnishio/express-boilerplate,ericnishio/express-boilerplate,ericnishio/express-boilerplate | ---
+++
@@ -2,7 +2,7 @@
import {isObjectId} from '../helpers'
import Post, {DbPost, UpsertPost} from '../models/Post'
-export const findPostById = async (id: Id): Promise<DbPost> => {
+export const findPostById = async (id: Id): Promise<DbPost|undefined> => {
return isObjectId(id) ? await Post.findById(id) : u... |
6de608a3595470c673067774506de73d6f2a0111 | src/components/course-summary.tsx | src/components/course-summary.tsx | import * as React from "react";
import {Class, Course} from "../class"
import {Toggle} from "./utilities/toggle"
import {ClassList} from "./class-list"
import {Department} from "./department"
export interface CourseSummaryProps {
classes: Class[],
course: Course
}
export class CourseSummary extends React.Compo... | import * as React from "react";
import {Class, Course} from "../class"
import {Toggle} from "./utilities/toggle"
import {ClassList} from "./class-list"
import {Department} from "./department"
export interface CourseSummaryProps {
classes: Class[],
course: Course
}
export class CourseSummary extends React.Compo... | Add a : after the course number | Add a : after the course number
| TypeScript | mit | goodbye-island/S-Store-Front-End,goodbye-island/S-Store-Front-End,goodbye-island/S-Store-Front-End | ---
+++
@@ -16,8 +16,8 @@
<span className="department-acronym"><Department departmentID={this.props.course.department}/></span>
<span> </span>
<span className="course-number">{this.props.course.course}</span>
- <span> </... |
d47c9aff6ad222e4a2bffda15828c5f5c043b63d | types/react-hyperscript/index.d.ts | types/react-hyperscript/index.d.ts | // Type definitions for react-hyperscript 3.0
// Project: https://github.com/mlmorg/react-hyperscript
// Definitions by: tock203 <https://github.com/tock203>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ComponentClass, StatelessComponent, ReactElement } from 'r... | // Type definitions for react-hyperscript 3.0
// Project: https://github.com/mlmorg/react-hyperscript
// Definitions by: tock203 <https://github.com/tock203>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
import { ComponentClass, StatelessComponent, ReactElement } from 'r... | Stop treating Element as props | Stop treating Element as props
| TypeScript | mit | borisyankov/DefinitelyTyped,arusakov/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,zuzusik/DefinitelyTyped,one-pieces/DefinitelyTyped,georgemarshall/DefinitelyTyped,markogresak/DefinitelyTyped,alexdresko/DefinitelyTyped,AgentME/DefinitelyTyped,borisyankov/DefinitelyTyped,arusakov... | ---
+++
@@ -10,9 +10,14 @@
type Element = ReactElement<any> | string | null;
-declare function h<P>(
+declare function h(
+ componentOrTag: ComponentClass | StatelessComponent | string,
+ children?: ReadonlyArray<Element> | Element
+): ReactElement<any>;
+
+declare function h<P extends {[attr: string]: any... |
a441297e6f5c4492318a6d60bbc292ca4da64b50 | src/app/utils/url.utils.ts | src/app/utils/url.utils.ts | import {Injectable, Inject} from '@angular/core';
@Injectable()
export class UrlUtils {
constructor(@Inject('DataPathUtils') private dataPathUtils) {
}
public urlIsClearOfParams(url) {
if (url.indexOf(':') >= 0) {
return false;
}
return url;
}
public extractId... | import {Injectable, Inject} from '@angular/core';
@Injectable()
export class UrlUtils {
constructor(@Inject('DataPathUtils') private dataPathUtils) {
}
public urlIsClearOfParams(url) {
if (url.indexOf(':') >= 0) {
return false;
}
return url;
}
public extractId... | Support relative urls in config file | Support relative urls in config file
| TypeScript | mit | dsternlicht/RESTool,dsternlicht/RESTool,dsternlicht/RESTool | ---
+++
@@ -14,7 +14,7 @@
}
public extractIdFieldName(url) {
- const matcher = /http[s]?:\/\/.*\/:([a-zA-Z0-9_-]*)[\/|\?|#]?.*/;
+ const matcher = /:([a-zA-Z0-9_-]+)[\/?#&]?.*/;
const extractArr = url.match(matcher);
if (extractArr.length > 1) {
return extractA... |
a30e9355cf98a8d8f6590187de6b58d7f4f9fd3a | src/service/quoting-styles/style-registry.ts | src/service/quoting-styles/style-registry.ts | /// <reference path="../../common/models.ts" />
/// <reference path="../../../typings/tsd.d.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
import _ = require("lodash");
export class QuotingStyleRegistry {
private _mapping : StyleHelpers.QuoteStyle[];
constructor... | /// <reference path="../../common/models.ts" />
/// <reference path="../../../typings/tsd.d.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
import _ = require("lodash");
class NullQuoteGenerator implements StyleHelpers.QuoteStyle {
Mode = null;
GenerateQuot... | Fix null ref on startup | Fix null ref on startup
| TypeScript | isc | michaelgrosner/tribeca,michaelgrosner/tribeca,michaelgrosner/tribeca | ---
+++
@@ -4,6 +4,14 @@
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
import _ = require("lodash");
+
+class NullQuoteGenerator implements StyleHelpers.QuoteStyle {
+ Mode = null;
+
+ GenerateQuote = (market: Models.Market, fv: Models.FairValue, params: Models.... |
8d0651a0943990c994dc41ce23a8ae8857d09778 | cypress/integration/navigation.spec.ts | cypress/integration/navigation.spec.ts | import { visit } from '../helper';
describe('Navigation', () => {
before(() => {
visit('official-storybook');
});
it('should search navigation item', () => {
cy.get('#storybook-explorer-searchfield').click().clear().type('persisting the action logger');
cy.get('.sidebar-container a')
.should(... | import { visit } from '../helper';
describe('Navigation', () => {
before(() => {
visit('official-storybook');
});
it('should search navigation item', () => {
cy.get('#storybook-explorer-searchfield').click().clear().type('syntax');
cy.get('#storybook-explorer-menu button')
.should('contain', ... | Update e2e test for search. | Update e2e test for search.
| TypeScript | mit | storybooks/react-storybook,storybooks/react-storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/react-storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,kadirahq/react-storybook,kadirahq/react-storybook,storybooks/storybook | ---
+++
@@ -6,17 +6,17 @@
});
it('should search navigation item', () => {
- cy.get('#storybook-explorer-searchfield').click().clear().type('persisting the action logger');
+ cy.get('#storybook-explorer-searchfield').click().clear().type('syntax');
- cy.get('.sidebar-container a')
- .should('co... |
dc3f85a68ebd00b2c07fc18ff6fe5cbb8e227984 | ui/puz/src/run.ts | ui/puz/src/run.ts | import { Run } from './interfaces';
import { Config as CgConfig } from 'chessground/config';
import { uciToLastMove } from './util';
import { makeFen } from 'chessops/fen';
import { chessgroundDests } from 'chessops/compat';
export const makeCgOpts = (run: Run, canMove: boolean): CgConfig => {
const cur = run.curren... | import { Run } from './interfaces';
import { Config as CgConfig } from 'chessground/config';
import { uciToLastMove } from './util';
import { makeFen } from 'chessops/fen';
import { chessgroundDests } from 'chessops/compat';
export const makeCgOpts = (run: Run, canMove: boolean): CgConfig => {
const cur = run.curren... | Revert "hardcode text until translations are available - REVERT ME" | Revert "hardcode text until translations are available - REVERT ME"
This reverts commit 2e482f2c97d9258a48adc0c259e368765eefdc27.
| TypeScript | agpl-3.0 | luanlv/lila,luanlv/lila,luanlv/lila,luanlv/lila,arex1337/lila,arex1337/lila,arex1337/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila,arex1337/lila,arex1337/lila,luanlv/lila | ---
+++
@@ -20,5 +20,5 @@
};
};
-export const povMessage = (run: Run) => `You play the ${run.pov} pieces in all puzzles`;
-// `youPlayThe${run.pov == 'white' ? 'White' : 'Black'}PiecesInAllPuzzles`;
+export const povMessage = (run: Run) =>
+ `youPlayThe${run.pov == 'white' ? 'White' : 'Black'}PiecesInAllPuzzle... |
bb68475dbb2a4b33d2ac382fa0f1f697b9038adb | services/QuillDiagnostic/app/components/eslDiagnostic/titleCard.tsx | services/QuillDiagnostic/app/components/eslDiagnostic/titleCard.tsx | import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
class TitleCard extends Component {
getContentHTML() {
let html = this.props.data.content ? this.props.data.content : translations.en... | import React, { Component } from 'react';
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
export interface ComponentProps {
data: any
language: string
nextQuestion(): void
}
class TitleCard extends Component<ComponentProps,... | Add prop declaration for titlecard tsx in esl diagnostic | Add prop declaration for titlecard tsx in esl diagnostic
| TypeScript | agpl-3.0 | empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core,empirical-org/Empirical-Core | ---
+++
@@ -2,7 +2,13 @@
const beginArrow = 'https://assets.quill.org/images/icons/begin_arrow.svg';
import translations from '../../libs/translations/index.js';
-class TitleCard extends Component {
+export interface ComponentProps {
+ data: any
+ language: string
+ nextQuestion(): void
+}
+
+class TitleCard e... |
4b34ca5b7fd4c88b464d6cec22ed4896e44f6329 | src/mergeProps.ts | src/mergeProps.ts | /** @module react-elementary/lib/mergeProps */
import classNames = require('classnames')
import { mergeWithKey } from 'ramda'
export interface IReducers { [key: string]: (...args: any[]) => any }
function customizeMerges(reducers: IReducers) {
return function mergeCustomizer(key: string, ...values: any[]) {
co... | /** @module react-elementary/lib/mergeProps */
import classNames = require('classnames')
import {
apply,
evolve,
map,
mapObjIndexed,
merge,
mergeAll,
nth,
pickBy,
pipe,
pluck,
prop,
unapply,
} from 'ramda'
export interface IReducers {
[key: string]: (...args: any[]) => any
}
function isNotU... | Rewrite to apply functions once | Rewrite to apply functions once
| TypeScript | mit | thirdhand/react-elementary,thirdhand/react-elementary | ---
+++
@@ -1,18 +1,27 @@
/** @module react-elementary/lib/mergeProps */
import classNames = require('classnames')
-import { mergeWithKey } from 'ramda'
+import {
+ apply,
+ evolve,
+ map,
+ mapObjIndexed,
+ merge,
+ mergeAll,
+ nth,
+ pickBy,
+ pipe,
+ pluck,
+ prop,
+ unapply,
+} from 'ramda'
-exp... |
f08219d1d5317ca30dbadaf98dbe44aa66c80881 | client/imports/band/band.module.ts | client/imports/band/band.module.ts | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MaterialModule } from '@angular/material';
import { FlexLayoutModule } from '@angular/flex-layout';
import { SongModule } from '../song/song.module';
import { BandComponent } from './band.component';
import { B... | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MaterialModule } from '@angular/material';
import { FlexLayoutModule } from '@angular/flex-layout';
import { TranslateModule } from '@ngx-translate/core';
import { SongModule } from '../song/song.module';
import... | Add missing TranslateModule in BandModule | Add missing TranslateModule in BandModule
| TypeScript | agpl-3.0 | singularities/song-pot,singularities/song-pot,singularities/songs-pot,singularities/songs-pot,singularities/songs-pot,singularities/song-pot | ---
+++
@@ -2,6 +2,7 @@
import { CommonModule } from '@angular/common';
import { MaterialModule } from '@angular/material';
import { FlexLayoutModule } from '@angular/flex-layout';
+import { TranslateModule } from '@ngx-translate/core';
import { SongModule } from '../song/song.module';
@@ -14,6 +15,7 @@
... |
4a52da43a151e26a05946b5d60eb07841fc4160b | frontend/src/app/app-routing.module.ts | frontend/src/app/app-routing.module.ts | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BuildsPage } from '@page/builds/builds.page';
import { ChampionPage } from '@page/champion/champion.page';
import { ChampionsPage } from '@page/champions/champions.page';
const routes: Routes = [
{ path: 'buil... | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { BuildsPage } from '@page/builds/builds.page';
import { ChampionPage } from '@page/champion/champion.page';
import { ChampionsPage } from '@page/champions/champions.page';
import { NotFoundPage } from '@page/error... | Set ** path to NotFoundPage | Set ** path to NotFoundPage
| TypeScript | mit | drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild,drumonii/LeagueTrollBuild | ---
+++
@@ -4,6 +4,7 @@
import { BuildsPage } from '@page/builds/builds.page';
import { ChampionPage } from '@page/champion/champion.page';
import { ChampionsPage } from '@page/champions/champions.page';
+import { NotFoundPage } from '@page/error/not-found.page';
const routes: Routes = [
{ path: 'builds', re... |
d9dad52a0f837d2a7f73062a686943808cee543e | src/client/web/components/PathwayDisplay/PrerequisiteBox/JobGroupBox.tsx | src/client/web/components/PathwayDisplay/PrerequisiteBox/JobGroupBox.tsx | import * as React from 'react'
import text from '../../../../utils/text'
import { JobClassification, JobGroup } from '../../../../../definitions/auxiliary/JobClassification'
import data from '../../../../../data'
function getParentClass(jobGroup: JobGroup): JobClassification | null {
for (const region of data.regi... | import * as React from 'react'
import text from '../../../../utils/text'
import { JobClassification, JobGroup } from '../../../../../definitions/auxiliary/JobClassification'
import data from '../../../../../data'
function getParentClass(jobGroup: JobGroup): JobClassification | null {
for (const region of data.regi... | Improve link style and code style | Improve link style and code style
Signed-off-by: Andy Shu <d9a5ae79e0620530e640970c782273ccd89702f2@gmail.com>
| TypeScript | agpl-3.0 | wikimigrate/wikimigrate,wikimigrate/wikimigrate,wikimigrate/wikimigrate,wikimigrate/wikimigrate | ---
+++
@@ -15,24 +15,23 @@
return null
}
-const jobClassStyle = {
- textDecoration: 'none',
- fontWeight: 'bolder',
-} as React.CSSProperties
-
const JobGroupBox = (props: { jobGroup: JobGroup }) => {
const jobGroup = props.jobGroup
const parentClass = getParentClass(jobGroup)
return (
... |
7212ad8f8b4d5eb7cb2916cef5f898c1c7d8797b | app/app.ts | app/app.ts | import {App, Platform} from 'ionic-angular';
import {TabsPage} from './pages/tabs/tabs';
// https://angular.io/docs/ts/latest/api/core/Type-interface.html
import {Type} from 'angular2/core';
@App({
template: '<ion-nav [root]="rootPage"></ion-nav>',
config: {} // http://ionicframework.com/docs/v2/api/config/Confi... | import {App, Platform} from 'ionic-angular';
import {TabsPage} from './pages/tabs/tabs';
// https://angular.io/docs/ts/latest/api/core/Type-interface.html
import {Type, enableProdMode} from 'angular2/core';
enableProdMode();
@App({
template: '<ion-nav [root]="rootPage"></ion-nav>',
config: {} // http://ionicf... | Enable production mode in Angular2 | Enable production mode in Angular2
| TypeScript | mit | neilgoldman305/marvin-ui,neilgoldman305/marvin-ui,neilgoldman305/marvin-ui | ---
+++
@@ -2,32 +2,32 @@
import {TabsPage} from './pages/tabs/tabs';
// https://angular.io/docs/ts/latest/api/core/Type-interface.html
-import {Type} from 'angular2/core';
-
+import {Type, enableProdMode} from 'angular2/core';
+enableProdMode();
@App({
- template: '<ion-nav [root]="rootPage"></ion-nav>',
- ... |
9d269849987fbe374b0f76a4893fdf9d867b8b84 | editors/code/src/utils/processes.ts | editors/code/src/utils/processes.ts | 'use strict';
import * as cp from 'child_process';
import ChildProcess = cp.ChildProcess;
import { join } from 'path';
const isWindows = process.platform === 'win32';
const isMacintosh = process.platform === 'darwin';
const isLinux = process.platform === 'linux';
export function terminate(process: ChildProcess, cwd?... | 'use strict';
import * as cp from 'child_process';
import ChildProcess = cp.ChildProcess;
import { join } from 'path';
const isWindows = process.platform === 'win32';
const isMacintosh = process.platform === 'darwin';
const isLinux = process.platform === 'linux';
// this is very complex, but is basically copy-pased... | Add terminate process implemntation note | Add terminate process implemntation note
| TypeScript | apache-2.0 | rust-analyzer/rust-analyzer,rust-analyzer/rust-analyzer,rust-analyzer/rust-analyzer,rust-analyzer/rust-analyzer,rust-analyzer/rust-analyzer | ---
+++
@@ -8,6 +8,13 @@
const isWindows = process.platform === 'win32';
const isMacintosh = process.platform === 'darwin';
const isLinux = process.platform === 'linux';
+
+// this is very complex, but is basically copy-pased from VSCode implementation here:
+// https://github.com/Microsoft/vscode-languageserver-n... |
550b7714b4f680eab52c006d19164b5676925b94 | src/angular/projects/spark-angular/src/lib/components/sprk-list-item/sprk-list-item.component.ts | src/angular/projects/spark-angular/src/lib/components/sprk-list-item/sprk-list-item.component.ts | import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
@Component({
selector: 'sprk-list-item',
template: `
<ng-template>
<ng-content></ng-content>
</ng-template>
`
})
export class SprkListItemComponent {
@Input()
analyticsString: string;
@Input()
idString: string;
@Inp... | import { Component, Input, TemplateRef, ViewChild } from '@angular/core';
@Component({
selector: 'sprk-list-item',
template: `
<ng-template>
<ng-content></ng-content>
</ng-template>
`
})
export class SprkListItemComponent {
@Input()
analyticsString: string;
@Input()
idString: string;
@Inp... | Add static true for ViewChild for Angular 8 | Add static true for ViewChild for Angular 8
| TypeScript | mit | sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system,sparkdesignsystem/spark-design-system | ---
+++
@@ -16,5 +16,5 @@
@Input()
additionalClasses: string;
- @ViewChild(TemplateRef) content: TemplateRef<any>;
+ @ViewChild(TemplateRef, { static: true }) content: TemplateRef<any>;
} |
3e812032da7246f4056190dbef88fb0c85e0be7f | console/src/app/core/services/charts-provider-service/charts-provider.service.ts | console/src/app/core/services/charts-provider-service/charts-provider.service.ts | import { Injectable } from '@angular/core';
import { PrometheusApiService } from '../prometheus-api/prometheus-api.service';
import { MongooseChartDao } from '../../models/chart/mongoose-chart-interface/mongoose-chart-dao.model';
@Injectable({
providedIn: 'root'
})
export class ChartsProviderService {
private mon... | import { Injectable } from '@angular/core';
import { PrometheusApiService } from '../prometheus-api/prometheus-api.service';
import { MongooseChartDao } from '../../models/chart/mongoose-chart-interface/mongoose-chart-dao.model';
import { MongooseMetric } from '../../models/chart/mongoose-metric.model';
import { Mongoo... | Add charts to ChartsProviderService. Add larency chart updation method to it. | Add charts to ChartsProviderService. Add larency chart updation method to it.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -1,6 +1,12 @@
import { Injectable } from '@angular/core';
import { PrometheusApiService } from '../prometheus-api/prometheus-api.service';
import { MongooseChartDao } from '../../models/chart/mongoose-chart-interface/mongoose-chart-dao.model';
+import { MongooseMetric } from '../../models/chart/mongoose... |
4fe61b060e307a634d912b9754e3bba77c9ae5fe | server/src/main/webapp/WEB-INF/rails/webpack/config/loaders/static-assets-loader.ts | server/src/main/webapp/WEB-INF/rails/webpack/config/loaders/static-assets-loader.ts | /*
* Copyright 2019 ThoughtWorks, Inc.
*
* 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 agr... | /*
* Copyright 2019 ThoughtWorks, Inc.
*
* 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 agr... | Fix build that broke because of `file-loader` upgrade. | Fix build that broke because of `file-loader` upgrade.
| TypeScript | apache-2.0 | marques-work/gocd,arvindsv/gocd,marques-work/gocd,ketan/gocd,gocd/gocd,marques-work/gocd,gocd/gocd,arvindsv/gocd,ibnc/gocd,marques-work/gocd,GaneshSPatil/gocd,marques-work/gocd,ibnc/gocd,GaneshSPatil/gocd,gocd/gocd,Skarlso/gocd,Skarlso/gocd,ketan/gocd,arvindsv/gocd,ketan/gocd,Skarlso/gocd,ibnc/gocd,gocd/gocd,Skarlso/go... | ---
+++
@@ -25,7 +25,8 @@
loader: "file-loader",
options: {
name: configOptions.production ? "[name]-[hash].[ext]" : "[name].[ext]",
- outputPath: configOptions.production ? "media/" : "fonts/"
+ outputPath: configOptions.production ? "media/" : "fonts/",
+ esMo... |
5e6e9212aac981e9fe7801d293c125cf9371d509 | src/package-reader.ts | src/package-reader.ts | import * as fs from "fs";
/**
* Typing for the fields of package.json we care about
*/
export interface PackageJson {
readonly main: string;
}
export interface ReadPackageJson {
(file: string): PackageJson | undefined;
}
/**
* @param packageJsonPath Path to package.json
* @param loadPackageJson Function th... | /**
* Typing for the fields of package.json we care about
*/
export interface PackageJson {
readonly main: string;
}
export interface ReadPackageJson {
(file: string): PackageJson | undefined;
}
/**
* @param packageJsonPath Path to package.json
* @param readPackageJson Function that reads and parses package... | Make parameter required and rename | Make parameter required and rename
| TypeScript | mit | dividab/tsconfig-paths,jonaskello/tsconfig-paths,dividab/tsconfig-paths,jonaskello/tsconfig-paths | ---
+++
@@ -1,5 +1,3 @@
-import * as fs from "fs";
-
/**
* Typing for the fields of package.json we care about
*/
@@ -13,19 +11,19 @@
/**
* @param packageJsonPath Path to package.json
- * @param loadPackageJson Function that reads and parses package.json.
+ * @param readPackageJson Function that reads an... |
c5d9862102c5ba69c4a27a6e89a42a15bab28362 | MonitoredSocket.ts | MonitoredSocket.ts | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | Use callbacks instead of trying to make socket calls sync | Use callbacks instead of trying to make socket calls sync
| TypeScript | mit | OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up | ---
+++
@@ -18,30 +18,32 @@
this.socket = new net.Socket();
}
- connect(): void {
+ connect(successCallback : void, failCallback : void): void {
this.socket.connect(
this.port,
this.endpoint,
- this.onConnectSuccess.bind(this)
+ this.onCon... |
53dad32841ddb39721dd6a3c44de083d507a6ee6 | test/browser/parallel.integration.specs.ts | test/browser/parallel.integration.specs.ts | import parallel from "../../src/browser/index";
describe("ParallelIntegration", function () {
it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) {
parallel
.range(100)
.reduce(0, (memo: number, value: number) => {
... | import parallel from "../../src/browser/index";
describe("ParallelIntegration", function () {
it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) {
parallel
.range(100)
.reduce(0, (memo: number, value: number) => memo + v... | Remove busy wait to avoid timeout on browserstack | Remove busy wait to avoid timeout on browserstack
| TypeScript | mit | MichaReiser/parallel.es,MichaReiser/parallel.es,DatenMetzgerX/parallel.es,MichaReiser/parallel.es,DatenMetzgerX/parallel.es,DatenMetzgerX/parallel.es | ---
+++
@@ -4,13 +4,7 @@
it("reduce waits for the result to be computed on the workers and returns the reduced value", function (done) {
parallel
.range(100)
- .reduce(0, (memo: number, value: number) => {
- for (let i = 0; i < 1e7; ++i) {
- ... |
033cb0ce0b459fda8db02e77cdf17f9f4e91d5bd | app/test/unit/path-test.ts | app/test/unit/path-test.ts | import { encodePathAsUrl } from '../../src/lib/path'
describe('path', () => {
describe('encodePathAsUrl', () => {
if (__WIN32__) {
it('normalizes path separators on Windows', () => {
const dirName =
'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app'
cons... | import { encodePathAsUrl } from '../../src/lib/path'
describe('path', () => {
describe('encodePathAsUrl', () => {
if (__WIN32__) {
it('normalizes path separators on Windows', () => {
const dirName =
'C:/Users/shiftkey\\AppData\\Local\\GitHubDesktop\\app-1.0.4\\resources\\app'
cons... | Remove test that was failing on purpose | Remove test that was failing on purpose
| TypeScript | mit | say25/desktop,shiftkey/desktop,desktop/desktop,kactus-io/kactus,artivilla/desktop,desktop/desktop,shiftkey/desktop,artivilla/desktop,desktop/desktop,say25/desktop,shiftkey/desktop,desktop/desktop,j-f1/forked-desktop,shiftkey/desktop,kactus-io/kactus,j-f1/forked-desktop,j-f1/forked-desktop,say25/desktop,j-f1/forked-desk... | ---
+++
@@ -18,10 +18,6 @@
})
}
- it('fails, hard', () => {
- expect(false).toBe(true)
- })
-
if (__DARWIN__ || __LINUX__) {
it('encodes spaces and hashes', () => {
const dirName = |
7e9b7d0d72ad92f54951d264a7bd282bd07ddff2 | lib/index.ts | lib/index.ts | export * from './src/angular-svg-icon.module';
export * from './src/svg-icon-registry.service';
export * from './src/svg-icon.component';
| export * from './src/angular-svg-icon.module';
export * from './src/svg-icon-registry.service';
export * from './src/svg-icon.component';
export * from './src/svg-loader';
| Add SVG loader to exports. | universal: Add SVG loader to exports.
| TypeScript | mit | czeckd/angular-svg-icon,czeckd/angular2-svg-icon,czeckd/angular2-svg-icon,czeckd/angular-svg-icon,czeckd/angular2-svg-icon,czeckd/angular-svg-icon | ---
+++
@@ -1,4 +1,4 @@
export * from './src/angular-svg-icon.module';
export * from './src/svg-icon-registry.service';
export * from './src/svg-icon.component';
-
+export * from './src/svg-loader'; |
f8400e0f01ed045d2c609d12fb1f6c4c040991f3 | src/Home/Home.tsx | src/Home/Home.tsx | import * as React from 'react';
import TurnatoBar from '../App/TurnatoBar';
import Header from './Header';
import GamesSection from './GamesSection';
class Home extends React.Component<{}, {}> {
render() {
return (
<TurnatoBar>
<Header />
<GamesSection />
<p style={{ fontSize: '12px... | import * as React from 'react';
import TurnatoBar from '../App/TurnatoBar';
import Header from './Header';
import GamesSection from './GamesSection';
import { Link } from 'react-router-dom';
class Home extends React.Component<{}, {}> {
render() {
return (
<TurnatoBar>
<Header />
<GamesSecti... | Use <Link> instead of <a> | Use <Link> instead of <a>
| TypeScript | agpl-3.0 | Felizardo/turnato,Felizardo/turnato,Felizardo/turnato | ---
+++
@@ -2,6 +2,7 @@
import TurnatoBar from '../App/TurnatoBar';
import Header from './Header';
import GamesSection from './GamesSection';
+import { Link } from 'react-router-dom';
class Home extends React.Component<{}, {}> {
render() {
@@ -19,12 +20,11 @@
GitHub
</a>
&n... |
3cc5f55cdc15d7e0d043161b7e4b68e76bd90644 | projects/alveo-transcriber/src/lib/shared/annotation-exporter.service.spec.ts | projects/alveo-transcriber/src/lib/shared/annotation-exporter.service.spec.ts | import { TestBed, inject } from '@angular/core/testing';
import { AnnotationExporterService } from './annotation-exporter.service';
describe('AnnotationExporterService', () => {
beforeEach(() => {
TestBed.configureTestingModule({
providers: [AnnotationExporterService]
});
});
it('should be create... | import { TestBed, inject } from '@angular/core/testing';
import { Annotation } from './annotation';
import { AnnotationExporterService } from './annotation-exporter.service';
describe('AnnotationExporterService', () => {
function generateAnnotations(): Array<Annotation> {
let annotations = new Array<Annotation... | Create CSV export unit test | Create CSV export unit test
| TypeScript | bsd-3-clause | Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber,Alveo/alveo-transcriber | ---
+++
@@ -1,8 +1,18 @@
import { TestBed, inject } from '@angular/core/testing';
+import { Annotation } from './annotation';
import { AnnotationExporterService } from './annotation-exporter.service';
+
describe('AnnotationExporterService', () => {
+ function generateAnnotations(): Array<Annotation> {
+ le... |
841735c97c776f8d222e1c5ea885ccc4e5b38a60 | MonitoredSocket.ts | MonitoredSocket.ts | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | import net = require("net");
/**
* Represents a given host and port. Handles checking whether a host
* is up or not, as well as if it is accessible on the given port.
*/
class MonitoredSocket {
/**
* Returns whether the host can be accessed on its port.
*/
public isUp: boolean;
private socke... | Fix typing issues on callbacks | Fix typing issues on callbacks
| TypeScript | mit | OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up,OzuYatamutsu/is-my-server-up | ---
+++
@@ -18,7 +18,8 @@
this.socket = new net.Socket();
}
- connect(successCallback : void, failCallback : void): void {
+ connect(successCallback: { (sock: MonitoredSocket): void },
+ failCallback: { (sock: MonitoredSocket): void }): void {
this.socket.connect(
th... |
d6094b87df963609ce46a6dd0cee2999654072d6 | redux-logger/redux-logger-tests.ts | redux-logger/redux-logger-tests.ts | /// <reference path="./redux-logger.d.ts" />
import createLogger from 'redux-logger';
import { applyMiddleware, createStore } from 'redux'
let logger = createLogger();
let loggerWithOpts = createLogger({
actionTransformer: actn => actn,
collapsed: true,
duration: true,
level: 'error',
logger: console,
pr... | /// <reference path="./redux-logger.d.ts" />
import * as createLogger from 'redux-logger';
import { applyMiddleware, createStore } from 'redux'
let logger = createLogger();
let loggerWithOpts = createLogger({
level: 'error',
duration: true,
timestamp: true,
colors: {
title: (action) => '#000000',
pre... | Update tests for redux-logger 2.6.0. | Update tests for redux-logger 2.6.0.
| TypeScript | mit | jraymakers/DefinitelyTyped,florentpoujol/DefinitelyTyped,gandjustas/DefinitelyTyped,johan-gorter/DefinitelyTyped,smrq/DefinitelyTyped,zuzusik/DefinitelyTyped,georgemarshall/DefinitelyTyped,subash-a/DefinitelyTyped,martinduparc/DefinitelyTyped,AgentME/DefinitelyTyped,eugenpodaru/DefinitelyTyped,mcrawshaw/DefinitelyTyped... | ---
+++
@@ -1,19 +1,29 @@
/// <reference path="./redux-logger.d.ts" />
-import createLogger from 'redux-logger';
+import * as createLogger from 'redux-logger';
import { applyMiddleware, createStore } from 'redux'
let logger = createLogger();
let loggerWithOpts = createLogger({
+ level: 'error',
+ duration... |
685074456648ecea6c0f9f3a92948fc006e18f63 | webpack/redux/__tests__/refresh_logs_tests.ts | webpack/redux/__tests__/refresh_logs_tests.ts | const mockGet = jest.fn(() => {
return Promise.resolve({ data: [mockLog.body] });
});
jest.mock("axios", () => ({ default: { get: mockGet } }));
import { refreshLogs } from "../refresh_logs";
import axios from "axios";
import { API } from "../../api";
import { resourceReady } from "../../sync/actions";
import { fakeL... | const mockGet = jest.fn(() => {
return Promise.resolve({ data: [mockLog.body] });
});
jest.mock("axios", () => ({ default: { get: mockGet } }));
import { refreshLogs } from "../refresh_logs";
import axios from "axios";
import { API } from "../../api";
import { SyncResponse } from "../../sync/actions";
import { fakeLo... | Update log tests to account for reducer-assigned UUIDs | Update log tests to account for reducer-assigned UUIDs
| TypeScript | mit | FarmBot/farmbot-web-app,RickCarlino/farmbot-web-app,RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/Farm... | ---
+++
@@ -5,8 +5,10 @@
import { refreshLogs } from "../refresh_logs";
import axios from "axios";
import { API } from "../../api";
-import { resourceReady } from "../../sync/actions";
+import { SyncResponse } from "../../sync/actions";
import { fakeLog } from "../../__test_support__/fake_state/resources";
+impor... |
466700e0829df64dbb854874336311e3552fc355 | src/js/components/CloseButton.tsx | src/js/components/CloseButton.tsx | import React from 'react'
export default props => {
const { onClick, disabled } = props
return (
<button
{...{
onClick,
disabled
}}
className='inline-flex items-center justify-center w-8 h-8 p-4 m-2 text-red-200 bg-transparent rounded-full hover:text-red-500 hover:bg-red-100 f... | import React from 'react'
export default props => {
const { onClick, disabled } = props
return (
<button
{...{
onClick,
disabled
}}
className='inline-flex items-center justify-center w-8 h-8 p-4 m-2 text-xl text-red-200 bg-transparent rounded-full hover:text-red-500 hover:bg-r... | Make close button X larger | Make close button X larger
| TypeScript | mit | xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2,xcv58/Tab-Manager-v2 | ---
+++
@@ -8,7 +8,7 @@
onClick,
disabled
}}
- className='inline-flex items-center justify-center w-8 h-8 p-4 m-2 text-red-200 bg-transparent rounded-full hover:text-red-500 hover:bg-red-100 focus:outline-none focus:shadow-outline active:bg-red-300 active:text-red-700'
+ className='... |
f53d0036edff12d57f355a051b524b6c3ebc5021 | tests/src/ui/data-grid.spec.ts | tests/src/ui/data-grid.spec.ts | /// <reference path="../../../typings/globals/jasmine/index.d.ts" />
import {
Component,
ViewChildren,
QueryList
} from '@angular/core';
import {
TestBed
} from '@angular/core/testing';
import {
DxDataGridModule,
DxDataGridComponent
} from '../../../dist';
@Component({
selector: 'test-co... | /// <reference path="../../../typings/globals/jasmine/index.d.ts" />
import {
Component,
ViewChildren,
QueryList
} from '@angular/core';
import {
TestBed
} from '@angular/core/testing';
import {
DxDataGridModule,
DxDataGridComponent
} from '../../../dist';
@Component({
selector: 'test-co... | Reduce timeout time in test to 0 | Reduce timeout time in test to 0
| TypeScript | mit | DevExpress/devextreme-angular,DevExpress/devextreme-angular,DevExpress/devextreme-angular | ---
+++
@@ -63,6 +63,6 @@
fixture.detectChanges();
done();
- }, 100);
+ }, 0);
});
}); |
ac630ff69b2c5b83771f881beda99538519c407b | src/test/index.ts | src/test/index.ts | //
// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
//
// This file is providing the test runner to use when running extension tests.
// By default the test runner in use is Mocha based.
//
// You can provide your own test runner if you want to override it by exporting
// a function run(testRoot: str... | /**
* PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
*
* This file is providing the test runner to use when running extension tests.
* By default the test runner in use is Mocha based.
*
* You can provide your own test runner if you want to override it by exporting
* a function run(testRoot: st... | Adjust the test-file according to tslint | Adjust the test-file according to tslint
| TypeScript | mit | manuth/MarkdownConverter,manuth/MarkdownConverter,manuth/MarkdownConverter | ---
+++
@@ -1,22 +1,23 @@
-//
-// PLEASE DO NOT MODIFY / DELETE UNLESS YOU KNOW WHAT YOU ARE DOING
-//
-// This file is providing the test runner to use when running extension tests.
-// By default the test runner in use is Mocha based.
-//
-// You can provide your own test runner if you want to override it by export... |
327924ca0cbfede69d31e247149c53510ed28c6e | src/index.ts | src/index.ts | import { Client, TextChannel, Message } from 'discord.js';
import { getCharacters } from './characters';
import QuoteManager from './quoteManager';
const client = new Client();
let quoteManager: QuoteManager;
client.on('ready', () => {
quoteManager = new QuoteManager();
console.log('Ready!');
});
client.on... | import { Client, TextChannel, Message } from 'discord.js';
import { getCharacters } from './characters';
import QuoteManager from './quoteManager';
const client = new Client();
let quoteManager: QuoteManager;
const helpCommand = '!cuiller-commands';
client.on('ready', () => {
quoteManager = new QuoteManager();
... | Set game status as the help command | Set game status as the help command
| TypeScript | mit | Lockeid/CuillerBot | ---
+++
@@ -5,15 +5,18 @@
let quoteManager: QuoteManager;
+const helpCommand = '!cuiller-commands';
+
client.on('ready', () => {
quoteManager = new QuoteManager();
+ client.user.setGame(helpCommand);
console.log('Ready!');
});
client.on('message', (msg: Message) => {
if (msg.author.bot |... |
3b4477bf919002351585f343e5e07c7ddcce9c79 | applications/drive/src/app/components/FileBrowser/hooks/useFileBrowserCheckbox.ts | applications/drive/src/app/components/FileBrowser/hooks/useFileBrowserCheckbox.ts | import { useCallback } from 'react';
import { useSelection } from '../state/useSelection';
export const useFileBrowserCheckbox = (id: string) => {
const selectionControls = useSelection();
const isSelected = Boolean(selectionControls?.isSelected(id));
const handleCheckboxChange = useCallback((e) => {
... | import { useCallback } from 'react';
import { useSelection } from '../state/useSelection';
export const useFileBrowserCheckbox = (id: string) => {
const selectionControls = useSelection();
const isSelected = Boolean(selectionControls?.isSelected(id));
const handleCheckboxChange = useCallback((e) => {
... | Fix shift selection on checkbox | Fix shift selection on checkbox
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,4 +1,5 @@
import { useCallback } from 'react';
+
import { useSelection } from '../state/useSelection';
export const useFileBrowserCheckbox = (id: string) => {
@@ -12,19 +13,25 @@
}
}, []);
- const handleCheckboxClick = useCallback((e) => {
- if (!e.shiftKey) {
- ... |
0acb6649bb9d7f18f55c6a0061e813abc0adc79d | server/test/routes.test.ts | server/test/routes.test.ts | import { Application } from 'express';
import * as request from 'supertest';
import { createServer } from '../src/server';
describe('routes', () => {
let app: Application;
before('create app', async () => {
app = createServer();
});
describe('GET /*', () => {
// Let the Angular app s... | import { Application } from 'express';
import * as request from 'supertest';
import { createServer } from '../src/server';
describe('routes', () => {
let app: Application;
before('create app', async () => {
app = createServer();
});
describe('GET /*', () => {
// Let the Angular app s... | Test non-HTML requests to /* | Test non-HTML requests to /*
| TypeScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium | ---
+++
@@ -21,5 +21,13 @@
.expect('Content-Type', /html/);
}
});
+
+ it('should respond with 404 when the Accept header is not for HTML', () => {
+ return request(app)
+ .get('/foo')
+ .accept('foo/bar')
+ .... |
c61266439468e140de5fb50d2c211c8ca4ae4263 | src/main.tsx | src/main.tsx | import * as React from "react";
import * as ReactDOM from "react-dom";
import * as injectTapEventPlugin from "react-tap-event-plugin";
import MenuBar from "./components/menu/MenuBar";
import SimpleContent from "./components/SimpleContent";
import TopPage from "./components/top/TopPage";
import EventPage from "./compone... | import * as React from "react";
import * as ReactDOM from "react-dom";
import * as injectTapEventPlugin from "react-tap-event-plugin";
import MenuBar from "./components/menu/MenuBar";
import SimpleContent from "./components/SimpleContent";
import TopPage from "./components/top/TopPage";
import EventPage from "./compone... | Add React-router path for MapEventList Componet | Add React-router path for MapEventList Componet
| TypeScript | mit | SIT-DigiCre/ShibaurasaiApp,SIT-DigiCre/ShibaurasaiApp,SIT-DigiCre/ShibaurasaiApp | ---
+++
@@ -8,6 +8,7 @@
import StagePage from "./components/stage/StagePage";
import SearchPage from "./components/search/SearchPage";
import MapPage from "./components/map/MapPage";
+import MapEventList from "./components/map/MapEventList";
import { Router, Route, hashHistory, IndexRoute } from "react-router";... |
7fbeaf1ad4bf164e1018acfa4e1759026c700116 | packages/@sanity/desk-tool/src/panes/documentPane/documentHistory/history/tracer.ts | packages/@sanity/desk-tool/src/panes/documentPane/documentHistory/history/tracer.ts | import {Doc, RemoteMutationWithVersion, TransactionLogEvent} from './types'
export type TraceEvent =
| {
type: 'initial'
publishedId: string
draft: Doc | null
published: Doc | null
}
| {type: 'addRemoteMutation'; event: RemoteMutationWithVersion}
| {type: 'addTranslogEntry'; event: Tr... | import {Doc, RemoteMutationWithVersion, TransactionLogEvent} from './types'
import {Timeline} from './timeline'
export type TraceEvent =
| {
type: 'initial'
publishedId: string
draft: Doc | null
published: Doc | null
}
| {type: 'addRemoteMutation'; event: RemoteMutationWithVersion}
| ... | Add helper function for replaying a timeline trace | [desk-tool] Add helper function for replaying a timeline trace
| TypeScript | mit | sanity-io/sanity,sanity-io/sanity,sanity-io/sanity,sanity-io/sanity | ---
+++
@@ -1,4 +1,5 @@
import {Doc, RemoteMutationWithVersion, TransactionLogEvent} from './types'
+import {Timeline} from './timeline'
export type TraceEvent =
| {
@@ -11,3 +12,40 @@
| {type: 'addTranslogEntry'; event: TransactionLogEvent}
| {type: 'didReachEarliestEntry'}
| {type: 'updateChunks'}
+... |
26dd668516fea18564dd975055e18ec921c9b267 | ui/test/logs/reducers/logs.test.ts | ui/test/logs/reducers/logs.test.ts | import reducer, {defaultState} from 'src/logs/reducers'
import {setTimeWindow} from 'src/logs/actions'
describe('Logs.Reducers', () => {
it('can set a time window', () => {
const expected = {
timeOption: 'now',
windowOption: '1h',
upper: null,
lower: 'now() - 1h',
seconds: 3600,
... | import reducer, {defaultState} from 'src/logs/reducers'
import {setTimeWindow, setTimeMarker, setTimeBounds} from 'src/logs/actions'
describe('Logs.Reducers', () => {
it('can set a time window', () => {
const actionPayload = {
windowOption: '10m',
seconds: 600,
}
const expected = {
tim... | Add Tests for new time range reducers | Add Tests for new time range reducers
Co-authored-by: Alex Paxton <bbdfaa9e47dc3439aa28f1fb2e87c12d0b156815@gmail.com>
Co-authored-by: Daniel Campbell <821887c588844d83343e7d6ba83259f50689d18c@gmail.com>
| TypeScript | mit | li-ang/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,li-ang/influxdb,influxdata/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,... | ---
+++
@@ -1,17 +1,57 @@
import reducer, {defaultState} from 'src/logs/reducers'
-import {setTimeWindow} from 'src/logs/actions'
+import {setTimeWindow, setTimeMarker, setTimeBounds} from 'src/logs/actions'
describe('Logs.Reducers', () => {
it('can set a time window', () => {
+ const actionPayload = {
+ ... |
6691c2c6baa498cfa7ab685ac06fbee97dd39e89 | test/support.ts | test/support.ts | import { fromObservable, Model, notify } from '../src/lib/model';
import { Updatable } from '../src/lib/updatable';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
let chai = require("chai");
let chaiAsPromised = require("chai-as-promised");
chai.should();
chai.use(chaiAsPromised... | import * as path from 'path';
import { fromObservable, Model, notify } from '../src/lib/model';
import { Updatable } from '../src/lib/updatable';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
let chai = require("chai");
let chaiAsPromised = require("chai-as-promised");
chai.sho... | Write out the coverage report after the test run | Write out the coverage report after the test run
| TypeScript | bsd-3-clause | paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline,paulcbetts/trickline | ---
+++
@@ -1,3 +1,4 @@
+import * as path from 'path';
import { fromObservable, Model, notify } from '../src/lib/model';
import { Updatable } from '../src/lib/updatable';
import { Observable } from 'rxjs/Observable';
@@ -8,7 +9,6 @@
chai.should();
chai.use(chaiAsPromised);
-
@notify('foo', 'bar')
export cl... |
0a0dd67bd69c0d8b759e264429412c65773373f0 | src/components/Checkbox/Checkbox.tsx | src/components/Checkbox/Checkbox.tsx | import * as React from "react";
import { FilterConsumer } from "../context/filter";
import { Container, HiddenInput, NativeInput } from "./styled";
export interface CheckboxProps {
name: string;
all?: boolean;
CheckboxRenderer?: React.ComponentType<CheckboxRendererProps>;
}
export interface CheckboxRendererProp... | import * as React from "react";
import { FilterConsumer } from "../context/filter";
import { Container, HiddenInput, NativeInput } from "./styled";
export interface CheckboxProps {
name: string;
all?: boolean;
CheckboxRenderer?: React.ComponentType<CheckboxRendererProps>;
}
export interface CheckboxRendererProp... | Add readonly prop to the checkbox input | Add readonly prop to the checkbox input
| TypeScript | mit | sajari/sajari-sdk-react,sajari/sajari-sdk-react | ---
+++
@@ -33,7 +33,12 @@
: this.onClick(name, isSelected, set)
}
>
- <HiddenInput type="checkbox" value={name} checked={isSelected} />
+ <HiddenInput
+ readOnly={true}
+ type="checkbox"
+ value={nam... |
4cf61e4273534a9f3254e3121e75f8be4cf3de5d | console/src/app/common/HttpUtils.ts | console/src/app/common/HttpUtils.ts | export class HttpUtils {
// NOTE: Checks if string matches an IP by pattern.
public static isIpAddressValid(ipAddress: string): boolean {
let ipValidationRegex: RegExp = new RegExp(/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.... | export class HttpUtils {
public static readonly PORT_NUMBER_UPPER_BOUND: number = 65535;
public static readonly LOCALHOST_KEYWORD: string = "localhost";
// NOTE: Checks if string matches an IP by pattern.
public static isIpAddressValid(ipAddress: string): boolean {
const localhostKeyword: stri... | Update ip validation function @ Http utils. | Update ip validation function @ Http utils.
| TypeScript | mit | emc-mongoose/console,emc-mongoose/console,emc-mongoose/console | ---
+++
@@ -1,9 +1,29 @@
export class HttpUtils {
+
+ public static readonly PORT_NUMBER_UPPER_BOUND: number = 65535;
+ public static readonly LOCALHOST_KEYWORD: string = "localhost";
// NOTE: Checks if string matches an IP by pattern.
public static isIpAddressValid(ipAddress: string): boolean {
- ... |
57aae1f7556284176ffe0dd1c0e7cbdfbd212f3e | src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/ClientApp/app/components/app/app.ts | src/Microsoft.AspNetCore.SpaTemplates/content/Aurelia-CSharp/ClientApp/app/components/app/app.ts | import { Aurelia, PLATFORM } from 'aurelia-framework';
import { Router, RouterConfiguration } from 'aurelia-router';
export class App {
router: Router;
configureRouter(config: RouterConfiguration, router: Router) {
config.title = 'Aurelia';
config.map([{
route: [ '', 'home' ],
... | import { Aurelia, PLATFORM } from 'aurelia-framework';
import { Router, RouterConfiguration } from 'aurelia-router';
export class App {
router: Router;
configureRouter(config: RouterConfiguration, router: Router) {
config.title = 'AureliaSpa';
config.map([{
route: [ '', 'home' ],
... | Fix failing test for Aurelia template | Fix failing test for Aurelia template
| TypeScript | apache-2.0 | aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore | ---
+++
@@ -5,7 +5,7 @@
router: Router;
configureRouter(config: RouterConfiguration, router: Router) {
- config.title = 'Aurelia';
+ config.title = 'AureliaSpa';
config.map([{
route: [ '', 'home' ],
name: 'home', |
c710fc7eb3e5d3d405b8c6f1be29ab01a22fa312 | src/v2/components/TopBar/components/AdvancedPrimarySearch/components/AdvancedSearchReturnLabel/index.tsx | src/v2/components/TopBar/components/AdvancedPrimarySearch/components/AdvancedSearchReturnLabel/index.tsx | import React from 'react'
import { Link } from 'react-router-dom'
import styled from 'styled-components'
import { mixin as boxMixin } from 'v2/components/UI/Box'
import Text from 'v2/components/UI/Text'
const Container = styled(Link).attrs({
mr: 5,
py: 1,
px: 2,
})`
${boxMixin}
display: flex;
align-items:... | import React from 'react'
import { Link } from 'react-router-dom'
import styled from 'styled-components'
import { mixin as boxMixin } from 'v2/components/UI/Box'
import Text from 'v2/components/UI/Text'
const Label = styled(Text).attrs({
color: 'gray.medium',
})`
display: inline;
`
const Container = styled(Link)... | Fix hover state for return label (closes ARE-466) | Fix hover state for return label (closes ARE-466)
| TypeScript | mit | aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell,aredotna/ervell | ---
+++
@@ -4,6 +4,12 @@
import { mixin as boxMixin } from 'v2/components/UI/Box'
import Text from 'v2/components/UI/Text'
+
+const Label = styled(Text).attrs({
+ color: 'gray.medium',
+})`
+ display: inline;
+`
const Container = styled(Link).attrs({
mr: 5,
@@ -16,14 +22,8 @@
justify-content: center;
... |
9bf3ae8f7ff7a2dd17673bc0855426fecb57b407 | src/object/index.ts | src/object/index.ts | // Copyright 2016 Joe Duffy. All rights reserved.
"use strict";
export function extend<T, U>(t: T, u: U): T & U;
export function extend<T, U, V>(t: T, u: U, v: V): T & U & V;
export function extend<T, U, V, W>(t: T, u: U, v: V, w: W): T & U & V & W;
export function extend(...args: any[]): any {
let res: any = {};... | // Copyright 2016 Joe Duffy. All rights reserved.
"use strict";
export function extend<T, U>(t: T, u: U): T & U;
export function extend<T, U, V>(t: T, u: U, v: V): T & U & V;
export function extend<T, U, V, W>(t: T, u: U, v: V, w: W): T & U & V & W;
export function extend(...args: any[]): any {
let res: any = {};... | Add simple helpers for dealing w/ null/undefined | Add simple helpers for dealing w/ null/undefined
| TypeScript | mit | joeduffy/nodets | ---
+++
@@ -11,3 +11,27 @@
return res;
}
+export function maybeNull<T, U>(t: T | null, func: (t: T) => U): U | null {
+ if (t === null) {
+ return null;
+ }
+ return func(t);
+}
+
+export function maybeUndefined<T, U>(t: T | undefined, func: (t: T) => U): U | undefined {
+ if (t === undefin... |
dec7761c438336e248b59d3843ce69cd961a33a8 | src/index.ts | src/index.ts | import { Application } from 'typedoc/dist/lib/application';
import { ParameterType } from 'typedoc/dist/lib/utils/options/declaration';
import { MarkdownPlugin } from './plugin';
module.exports = (PluginHost: Application) => {
const app = PluginHost.owner;
/**
* Expose additional options for consumption.
*... | import { Application } from 'typedoc/dist/lib/application';
import { ParameterType } from 'typedoc/dist/lib/utils/options/declaration';
import { MarkdownPlugin } from './plugin';
module.exports = (PluginHost: Application) => {
const app = PluginHost.owner;
if (app.converter.hasComponent('markdown')) {
return... | Check if plugin is already loaded before adding components | Check if plugin is already loaded before adding components
| TypeScript | mit | tgreyuk/typedoc-plugin-markdown,tgreyuk/typedoc-plugin-markdown | ---
+++
@@ -5,6 +5,10 @@
module.exports = (PluginHost: Application) => {
const app = PluginHost.owner;
+
+ if (app.converter.hasComponent('markdown')) {
+ return;
+ }
/**
* Expose additional options for consumption. |
cf15d34bc47ea7a7b4e553ebb749e76e91bf36b7 | js-md5/index.d.ts | js-md5/index.d.ts | // Type definitions for js-md5 v0.4.2
// Project: https://github.com/emn178/js-md5
// Definitions by: Michael McCarthy <https://github.com/mwmccarthy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/
declare namespace md5 {
type message = string | any[] | Uint8Array | ArrayBuffer;
interface... | // Type definitions for js-md5 v0.4.2
// Project: https://github.com/emn178/js-md5
// Definitions by: Michael McCarthy <https://github.com/mwmccarthy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped/
declare namespace md5 {
type message = string | any[] | Uint8Array | ArrayBuffer;
interface... | Replace stray tab with spaces | Replace stray tab with spaces
| TypeScript | mit | AgentME/DefinitelyTyped,aciccarello/DefinitelyTyped,borisyankov/DefinitelyTyped,benishouga/DefinitelyTyped,amir-arad/DefinitelyTyped,AgentME/DefinitelyTyped,smrq/DefinitelyTyped,jimthedev/DefinitelyTyped,markogresak/DefinitelyTyped,QuatroCode/DefinitelyTyped,YousefED/DefinitelyTyped,AbraaoAlves/DefinitelyTyped,aciccare... | ---
+++
@@ -22,7 +22,7 @@
hex: (message: message) => string;
array: (message: message) => number[];
digest: (message: message) => number[];
- arrayBuffer: (message: message) => ArrayBuffer;
+ arrayBuffer: (message: message) => ArrayBuffer;
buffer: (message: message) => Array... |
0a30fd0e40144d1a98fe15c94d792eab0d58695a | jSlider/Options.ts | jSlider/Options.ts | module jSlider {
export class Options {
private options:Object = {
"delay": 4000,
"duration": 200,
"effect": jSlider.Effect.SLIDE,
"button": {
"next": null,
"prev": null,
"stop": null,
"start": null
},
"on": {
"slide": [],
"next": [],
"prev": [],
"start": [],
"st... | module jSlider {
export class Options {
private options:Object = {
"delay": 4000,
"duration": 200,
"effect": jSlider.Effect.SLIDE,
"button": {
"next": null,
"prev": null,
"stop": null,
"start": null
},
"on": {
"slide": [],
"next": [],
"prev": [],
"start": [],
"st... | Fix second level options. options like on->someOption and button->option did not work as the loop was just asking if, for example "on" is set in the user defined option array. and even though the user might not have spesified a, for example "next" event, but has spesified the "slide" event. The entire "on" will be repl... | Fix second level options.
options like on->someOption and button->option
did not work as the loop was just asking if, for example
"on" is set in the user defined option array.
and even though the user might not have spesified a, for example
"next" event, but has spesified the "slide" event. The entire
"on" will be repl... | TypeScript | lgpl-2.1 | sigurdsvela/JSlider | ---
+++
@@ -20,11 +20,8 @@
};
constructor(options:Object = {}) {
- var option:string;
- for (option in this.options) {
- if (!this.options.hasOwnProperty(option)) continue;
- this.options[option] = options[option] || this.options[option];
- }
+ jQuery.extend(true, this.options, options);
+ con... |
cd81e24cea5ded7f178174a1f40631e566ebef5e | src/components/Room.ts | src/components/Room.ts | import PheromoneNetwork from './PheromoneNetwork'
// --- Properties ---
Object.defineProperty(Room.prototype, 'pheromoneNetwork', {
configurable: true,
get(this: Room) {
if (this._pheromoneNetwork === undefined && this.memory.pheromoneNetwork !== undefined) {
this._pheromoneNetwork = PheromoneNetwork.de... | import PheromoneNetwork from './PheromoneNetwork'
// --- Properties ---
Object.defineProperty(Room.prototype, 'pheromoneNetwork', {
configurable: true,
get(this: Room) {
if (this._pheromoneNetwork === undefined && this.memory.pheromoneNetwork !== undefined) {
this._pheromoneNetwork = PheromoneNetwork.de... | Reduce dissipation rate to 1 per 2 ticks | Reduce dissipation rate to 1 per 2 ticks
| TypeScript | unlicense | tinnvec/aints,tinnvec/aints | ---
+++
@@ -21,7 +21,9 @@
// --- Methods ---
Room.prototype.run = function(this: Room) {
- this.pheromoneNetwork.dissipate()
+ if (Game.time % 2 === 0) {
+ this.pheromoneNetwork.dissipate()
+ }
}
Room.prototype.draw = function(this: Room) { |
65c79a775feb264d08ca6fce6fbba5ae1822cf63 | packages/examples/src/generateUI.ts | packages/examples/src/generateUI.ts | import { registerExamples } from './register';
import { data as personData, } from './person';
export const schema = undefined;
export const uischema = undefined;
export const data = personData;
registerExamples([
{
name: 'generate-ui',
label: 'Generate UI Schema',
data,
schema,
uiSchema: uisch... | import { registerExamples } from './register';
import {data as personData, personCoreSchema } from './person';
export const schema = personCoreSchema;
export const uischema = undefined;
export const data = personData;
registerExamples([
{
name: 'generate-ui',
label: 'Generate UI Schema',
data,
schem... | Set person core schema to be used as schema in generate UI example | Set person core schema to be used as schema in generate UI example
| TypeScript | mit | qb-project/jsonforms,qb-project/jsonforms,qb-project/jsonforms | ---
+++
@@ -1,7 +1,7 @@
import { registerExamples } from './register';
-import { data as personData, } from './person';
+import {data as personData, personCoreSchema } from './person';
-export const schema = undefined;
+export const schema = personCoreSchema;
export const uischema = undefined;
export const data... |
5f35907f7f985724078564f0f084cb95c655b5e9 | packages/components/hooks/useLoad.ts | packages/components/hooks/useLoad.ts | import { useEffect } from 'react';
import { useRouteMatch } from 'react-router';
import { load } from 'proton-shared/lib/api/core/load';
import useApi from './useApi';
const useLoad = () => {
const api = useApi();
/*
* The "path" property on React Router's "match" object contains the
* path pattern... | import { useEffect } from 'react';
import { useRouteMatch } from 'react-router';
import { load } from 'proton-shared/lib/api/core/load';
import useApi from './useApi';
const useLoad = () => {
const api = useApi();
/*
* The "path" property on React Router's "match" object contains the
* path pattern... | Fix incorrect name for silence api config | Fix incorrect name for silence api config
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -22,7 +22,7 @@
const { path } = useRouteMatch();
useEffect(() => {
- api({ ...load(path), silent: true });
+ api({ ...load(path), silence: true });
}, []);
};
|
8264f3aa18be424ca9f137b9b8398bd6eec169e2 | src/types/Types.ts | src/types/Types.ts | /**
* @public
*/
export type Node = {
nodeType: number;
};
/**
* @public
*/
export type Attr = Node & {
localName: string;
name: string;
namespaceURI: string;
nodeName: string;
prefix: string;
value: string;
};
/**
* @public
*/
export type CharacterData = Node & { data: string };
/**
* @public
*/
expo... | /**
* @public
*/
export type Node = {
nodeType: number;
};
/**
* @public
*/
export type Attr = Node & {
localName: string;
name: string;
namespaceURI: string | null;
nodeName: string;
prefix: string | null;
value: string;
};
/**
* @public
*/
export type CharacterData = Node & { data: string };
/**
* @p... | Make the prefix/namespaceURI of Element/Attr nullable | Make the prefix/namespaceURI of Element/Attr nullable
This makes the typings more in-line with lib.dom | TypeScript | mit | FontoXML/fontoxpath,FontoXML/fontoxpath,FontoXML/fontoxpath | ---
+++
@@ -11,9 +11,9 @@
export type Attr = Node & {
localName: string;
name: string;
- namespaceURI: string;
+ namespaceURI: string | null;
nodeName: string;
- prefix: string;
+ prefix: string | null;
value: string;
};
@@ -52,9 +52,9 @@
*/
export type Element = Node & {
localName: string;
- namespa... |
cd9dac9f854da13c50885713b94aadaaab4502c0 | typings/tests/component-type-test.tsx | typings/tests/component-type-test.tsx | import styled from "../..";
declare const A: React.ComponentClass;
declare const B: React.StatelessComponent;
declare const C: React.ComponentClass | React.StatelessComponent;
styled(A); // succeeds
styled(B); // succeeds
styled(C); // used to fail; see issue trail linked below
// https://github.com/mui-org/material... | import styled from "../..";
declare const A: React.ComponentClass;
declare const B: React.StatelessComponent;
declare const C: React.ComponentClass | React.StatelessComponent;
styled(A); // succeeds
styled(B); // succeeds
styled(C); // used to fail; see issue trail linked below
// https://github.com/mui-org/material... | Add link to the TypeScript bug report | Add link to the TypeScript bug report
| TypeScript | mit | css-components/styled-components,styled-components/styled-components,JamieDixon/styled-components,JamieDixon/styled-components,JamieDixon/styled-components,styled-components/styled-components,styled-components/styled-components | ---
+++
@@ -11,4 +11,5 @@
// https://github.com/mui-org/material-ui/pull/8781#issuecomment-349460247
// https://github.com/mui-org/material-ui/issues/9838
// https://github.com/styled-components/styled-components/pull/1420
+// https://github.com/Microsoft/TypeScript/issues/21175
// https://github.com/styled-compo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.