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 |
|---|---|---|---|---|---|---|---|---|---|---|
42d0b16fde8eed3cd81a55577187cb4fb1fc09e5 | templates/expo-template-tabs/screens/ModalScreen.tsx | templates/expo-template-tabs/screens/ModalScreen.tsx | import * as React from 'react';
import { StyleSheet } from 'react-native';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View } from '../components/Themed';
export default function ModalScreen() {
return (
<View style={styles.container}>
<Text style={styles.title}>Modal</Text>
... | import { StatusBar } from 'expo-status-bar';
import * as React from 'react';
import { Platform, StyleSheet } from 'react-native';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View } from '../components/Themed';
export default function ModalScreen() {
return (
<View style={styles.con... | Add light status bar for modal | [template] Add light status bar for modal
| TypeScript | bsd-3-clause | exponent/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponent/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponent/exponent,exponentjs/exponent,exponentjs/expon... | ---
+++
@@ -1,5 +1,6 @@
+import { StatusBar } from 'expo-status-bar';
import * as React from 'react';
-import { StyleSheet } from 'react-native';
+import { Platform, StyleSheet } from 'react-native';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View } from '../components/Themed';
@@ ... |
5915b48f6c719a51faf5baae5e7f057d2533b6cd | Web/js/Visibility.ts | Web/js/Visibility.ts |
class Visibility {
private static isHidden: boolean;
static changed = new Signal();
static visible() {
return !Visibility.isHidden;
}
static hidden() {
return Visibility.isHidden;
}
private static _ctor = (() => {
Visibility.isHidden = false;
if (docum... |
class Visibility {
private static isHidden: boolean;
static changed = new Signal();
static visible() {
return !Visibility.isHidden;
}
static hidden() {
return Visibility.isHidden;
}
private static _ctor = (() => {
Visibility.isHidden = false;
if (docum... | Improve visibility reliability, fixes selection issues in IE | Improve visibility reliability, fixes selection issues in IE
| TypeScript | mit | Rohansi/RohBot,arcaneex/hash,arcaneex/hash,Rohansi/RohBot,arcaneex/hash,Rohansi/RohBot,arcaneex/hash,Rohansi/RohBot | ---
+++
@@ -25,12 +25,20 @@
}
})();
- private static onFocus() {
+ private static onFocus(e: any) {
+ var target = e.target || e.srcTarget;
+ if (target != window)
+ return;
+
Visibility.isHidden = false;
Visibility.changed.dispatch();
}
- pri... |
57606db7ccb839e063f046527376f45defe50ea7 | src/auth-module/auth-module.state.ts | src/auth-module/auth-module.state.ts | /*
eslint
@typescript-eslint/explicit-function-return-type: 0,
@typescript-eslint/no-explicit-any: 0
*/
export default function setupAuthState({ userService, serverAlias }) {
const state = {
accessToken: null, // The JWT
payload: null, // The JWT payload
entityIdField: 'userId',
responseEntityField: '... | /*
eslint
@typescript-eslint/explicit-function-return-type: 0,
@typescript-eslint/no-explicit-any: 0
*/
export default function setupAuthState({
userService,
serverAlias,
responseEntityField = 'user',
entityIdField = 'userId'
}) {
const state = {
accessToken: null, // The JWT
payload: null, // The JWT... | Allow customizing the entityIdField and responseEntityField | Allow customizing the entityIdField and responseEntityField
| TypeScript | mit | feathers-plus/feathers-vuex,feathers-plus/feathers-vuex | ---
+++
@@ -3,12 +3,17 @@
@typescript-eslint/explicit-function-return-type: 0,
@typescript-eslint/no-explicit-any: 0
*/
-export default function setupAuthState({ userService, serverAlias }) {
+export default function setupAuthState({
+ userService,
+ serverAlias,
+ responseEntityField = 'user',
+ entityIdField... |
fc1d833490d8cee11e9f271b100690f00bab81c6 | Mechanism/Texture.ts | Mechanism/Texture.ts | class Texture {
source: HTMLImageElement;
constructor(source: HTMLImageElement = undefined) {
this.source = source;
}
static fromImage(url: string): Texture {
const image = new Image();
const texture = new Texture(image);
image.src = url;
return texture;
}
... | class Texture {
source: HTMLImageElement;
constructor(source: HTMLImageElement = undefined) {
this.source = source;
}
static fromImage(url: string): Texture {
const image = new Image();
const texture = new Texture(image);
image.src = url;
image.onerror = () => {... | Add handling of image loading error. | Add handling of image loading error.
| TypeScript | apache-2.0 | Dia6lo/Mechanism,Dia6lo/Mechanism,Dia6lo/Mechanism | ---
+++
@@ -9,6 +9,7 @@
const image = new Image();
const texture = new Texture(image);
image.src = url;
+ image.onerror = () => { texture.source = undefined };
return texture;
}
|
4c1af878eb19e18f52c911ba30fb11ce9070781e | src/editorManager.ts | src/editorManager.ts | import Atom from './editors/atom'
import SublimeText2 from './editors/sublime-text2'
import SublimeText3 from './editors/sublime-text3'
import Vim from './editors/vim'
export default class EditorManager {
editors: Object
constructor() {
this.editors = {
'Atom': new Atom(),
'SublimeText2': new Su... | import Atom from './editors/atom'
import SublimeText2 from './editors/sublimeText2'
import SublimeText3 from './editors/sublimeText3'
import Vim from './editors/vim'
export default class EditorManager {
editors: Object
constructor() {
this.editors = {
'Atom': new Atom(),
'SublimeText2': new Subl... | Update Sublime ts files name to match the current | Update Sublime ts files name to match the current
The name of Sublime Text ts files is not identical with the actual file name, which generate error while running npm run build | TypeScript | bsd-3-clause | wakatime/desktop,wakatime/wakatime-desktop,wakatime/wakatime-desktop,wakatime/desktop,wakatime/desktop | ---
+++
@@ -1,6 +1,6 @@
import Atom from './editors/atom'
-import SublimeText2 from './editors/sublime-text2'
-import SublimeText3 from './editors/sublime-text3'
+import SublimeText2 from './editors/sublimeText2'
+import SublimeText3 from './editors/sublimeText3'
import Vim from './editors/vim'
|
d1e58637ec667b2108964b3d4d847b0c2f91bd6c | PublicApiV1/index.ts | PublicApiV1/index.ts | /**
* Main entrypoint for the public APIs handlers
*/
import { createAzureFunctionHandler } from "azure-function-express";
import * as express from "express";
const app = express();
import * as mongoose from "mongoose";
import { IProfileModel, ProfileModel } from "./models/profile";
import { profileSchema } from "... | /**
* Main entrypoint for the public APIs handlers
*/
import { createAzureFunctionHandler } from "azure-function-express";
import * as express from "express";
const app = express();
import * as mongoose from "mongoose";
import { IProfileModel, ProfileModel } from "./models/profile";
import { profileSchema } from "... | Allow POST to debug endpoint | Allow POST to debug endpoint
| TypeScript | mit | teamdigitale/digital-citizenship-functions,teamdigitale/digital-citizenship-functions,teamdigitale/digital-citizenship-functions | ---
+++
@@ -30,6 +30,7 @@
const profileModel = new ProfileModel(connection.model<IProfileModel>("Profile", profileSchema));
app.get("/api/v1/debug", debugHandler);
+app.post("/api/v1/debug", debugHandler);
app.get("/api/v1/profiles/:fiscalcode", getProfileHandler(profileModel));
// app.post("/api/v1/users/:fi... |
025009b50f2b8ad20405e21652c610413411e0ad | src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts | src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | Add 'Integrated' to toggle terminal action | Add 'Integrated' to toggle terminal action
Fixes #6706
| TypeScript | mit | gagangupt16/vscode,microsoft/vscode,bsmr-x-script/vscode,zyml/vscode,hungys/vscode,Zalastax/vscode,matthewshirley/vscode,ups216/vscode,DustinCampbell/vscode,zyml/vscode,williamcspace/vscode,zyml/vscode,KattMingMing/vscode,stringham/vscode,rishii7/vscode,stringham/vscode,the-ress/vscode,mjbvz/vscode,0xmohit/vscode,jchad... | ---
+++
@@ -11,7 +11,7 @@
export class ToggleTerminalAction extends Action {
public static ID = 'workbench.action.terminal.toggleTerminal';
- public static LABEL = nls.localize('toggleTerminal', "Toggle Terminal");
+ public static LABEL = nls.localize('toggleTerminal', "Toggle Integrated Terminal");
construc... |
807a7766c99890440b6d96a6f99b1b165a3ee5a0 | packages/lesswrong/components/common/AnalyticsClient.tsx | packages/lesswrong/components/common/AnalyticsClient.tsx | import React, {useCallback, useEffect} from 'react';
import { registerComponent } from '../../lib/vulcan-lib';
import { useMutation, gql } from '@apollo/client';
import { AnalyticsUtil } from '../../lib/analyticsEvents';
import { useCurrentUser } from './withUser';
import { useCookies } from 'react-cookie'
import withE... | import React, {useCallback, useEffect} from 'react';
import { registerComponent } from '../../lib/vulcan-lib';
import { useMutation, gql } from '@apollo/client';
import { AnalyticsUtil } from '../../lib/analyticsEvents';
import { useCurrentUser } from './withUser';
import { useCookies } from 'react-cookie'
import withE... | Fix missing client IDs in analytics events | Fix missing client IDs in analytics events
| TypeScript | mit | Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2,Discordius/Lesswrong2 | ---
+++
@@ -29,7 +29,7 @@
}, [mutate]);
const currentUserId = currentUser?._id;
- const clientId = cookies.cilentId;
+ const clientId = cookies.clientId;
useEffect(() => {
AnalyticsUtil.clientWriteEvents = flushEvents;
AnalyticsUtil.clientContextVars.userId = currentUserId; |
883a5a9f69de89a554c9b3c7936023792e9fe777 | src/app/shared/reducers/app.store.ts | src/app/shared/reducers/app.store.ts | import { Assignment, Class } from "../models";
export interface AppStore {
CURRENT_ASSIGNMENT: Assignment,
CURRENT_CLASS: Class
}
| import { Assignment, Class } from "../models";
export interface AppStore {
CURRENT_ASSIGNMENT: Assignment,
CURRENT_CLASS: Class,
All_CLASSES: Array<Class>
}
| Add all classes property in AppStore interface | Add all classes property in AppStore interface
| TypeScript | mit | bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder,bryant-pham/brograder | ---
+++
@@ -2,5 +2,6 @@
export interface AppStore {
CURRENT_ASSIGNMENT: Assignment,
- CURRENT_CLASS: Class
+ CURRENT_CLASS: Class,
+ All_CLASSES: Array<Class>
} |
a6443f83d48b67e2362b5b708109f4bd4472420d | src/components/basics/gif-marker.tsx | src/components/basics/gif-marker.tsx |
import * as React from "react";
import styled from "../styles";
const GifMarkerSpan = styled.span`
position: absolute;
top: 5px;
right: 5px;
background: #333333;
color: rgba(253, 253, 253, 0.74);
font-size: 12px;
padding: 2px 4px;
border-radius: 2px;
font-weight: bold;
opacity: .8;
`;
class GifMa... |
import * as React from "react";
import styled from "../styles";
const GifMarkerSpan = styled.span`
position: absolute;
top: 5px;
right: 5px;
background: #333333;
color: rgba(253, 253, 253, 0.74);
font-size: 12px;
padding: 2px 4px;
border-radius: 2px;
font-weight: bold;
opacity: .8;
`;
class GifMa... | Adjust typings of gifmarker so it can actually be used. | Adjust typings of gifmarker so it can actually be used.
| TypeScript | mit | itchio/itch,itchio/itch,itchio/itch,leafo/itchio-app,leafo/itchio-app,itchio/itchio-app,leafo/itchio-app,itchio/itch,itchio/itchio-app,itchio/itch,itchio/itch,itchio/itchio-app | ---
+++
@@ -15,9 +15,9 @@
opacity: .8;
`;
-class GifMarker extends React.PureComponent<void, void> {
+class GifMarker extends React.PureComponent<{}, void> {
render() {
- return <GifMarkerSpan>GIF</GifMarkerSpan>
+ return <GifMarkerSpan>GIF</GifMarkerSpan>;
}
}
|
468801e4ebfe636095d637e3290dcfa74383f9f6 | packages/apputils/src/index.ts | packages/apputils/src/index.ts | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import '../style/index.css';
export * from './clientsession';
export * from './clipboard';
export * from './collapse';
export * from './commandlinker';
export * from './commandpalette';
export * from './dialog';
exp... | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import '../style/index.css';
export * from './clientsession';
export * from './clipboard';
export * from './collapse';
export * from './commandlinker';
export * from './commandpalette';
export * from './dialog';
exp... | Fix missing export of IThemeManager token | Fix missing export of IThemeManager token
| TypeScript | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | ---
+++
@@ -21,6 +21,7 @@
export * from './splash';
export * from './styling';
export * from './thememanager';
+export * from './tokens';
export * from './toolbar';
export * from './vdom';
export * from './windowresolver'; |
9589778597f660d3f1fa78c347186c6d0931dd9a | developer/js/tests/test-punctuation.ts | developer/js/tests/test-punctuation.ts | import LexicalModelCompiler from '../';
import {assert} from 'chai';
import 'mocha';
const path = require('path');
describe('LexicalModelCompiler', function () {
describe('#generateLexicalModelCode', function () {
const MODEL_ID = 'example.qaa.trivial';
const PATH = path.join(__dirname, 'fixtures', MODEL_I... | import LexicalModelCompiler from '../';
import {assert} from 'chai';
import 'mocha';
const path = require('path');
describe('LexicalModelCompiler', function () {
describe('spefifying punctuation', function () {
const MODEL_ID = 'example.qaa.punctuation';
const PATH = path.join(__dirname, 'fixtures', MODEL_... | Test that the compiler adds the punctuation. | Test that the compiler adds the punctuation.
| TypeScript | apache-2.0 | tavultesoft/keymanweb,tavultesoft/keymanweb | ---
+++
@@ -6,24 +6,25 @@
describe('LexicalModelCompiler', function () {
- describe('#generateLexicalModelCode', function () {
- const MODEL_ID = 'example.qaa.trivial';
+ describe('spefifying punctuation', function () {
+ const MODEL_ID = 'example.qaa.punctuation';
const PATH = path.join(__dirname, ... |
c47c1c3da508e5e5b5ea3a31417103a3befbbfd3 | transpiler/src/emitter/statements.ts | transpiler/src/emitter/statements.ts | import { ReturnStatement } from 'typescript';
import { Context } from '../contexts';
import { EmitResult, emit } from './';
export const emitReturnStatement = ({ expression }: ReturnStatement, context: Context): EmitResult => {
const emit_result = emit(expression, context);
return {
...emit_result,
emitted... | import { ReturnStatement, VariableStatement } from 'typescript';
import { Context } from '../contexts';
import { EmitResult, emit } from './';
export const emitReturnStatement = ({ expression }: ReturnStatement, context: Context): EmitResult => {
const emit_result = emit(expression, context);
return {
...emit_... | Add emit for variable statement | Add emit for variable statement
| TypeScript | mit | artfuldev/RIoT | ---
+++
@@ -1,4 +1,4 @@
-import { ReturnStatement } from 'typescript';
+import { ReturnStatement, VariableStatement } from 'typescript';
import { Context } from '../contexts';
import { EmitResult, emit } from './';
@@ -9,3 +9,17 @@
emitted_string: `return ${emit_result.emitted_string};`
};
};
+
+export c... |
f9e273739dc2604db47b3e67578aac3a78c8792e | src/dashboard/login/login.ts | src/dashboard/login/login.ts | namespace DashboardHome {
angular.module("dashboard.login",
[
"auth0",
"ui.router"
])
.config(function myAppConfig($stateProvider) {
$stateProvider
.state("login", {
url: "/login",
templateUrl: "login... | namespace DashboardLogin {
angular.module("dashboard.login",
[
"auth0",
"ui.router"
])
.config(dashboardLoginConfig)
.controller("LoginCtrl", LoginController);
function dashboardLoginConfig($stateProvider) {
$stateProvider
.state("logi... | Move logic out of angular setup | Move logic out of angular setup
| TypeScript | mit | MrHen/hen-auth,MrHen/hen-auth,MrHen/hen-auth | ---
+++
@@ -1,26 +1,30 @@
-namespace DashboardHome {
+namespace DashboardLogin {
angular.module("dashboard.login",
[
"auth0",
"ui.router"
])
- .config(function myAppConfig($stateProvider) {
- $stateProvider
- .state("login", {
- ... |
25659a79343ed5b7805427f697602e193d89ddf9 | packages/examples/src/app/my-module/services/user2.controller.ts | packages/examples/src/app/my-module/services/user2.controller.ts | import { Service } from '@foal/core';
import { Sequelize, SequelizeConnectionService, SequelizeService } from '@foal/sequelize';
@Service()
export class Connection extends SequelizeConnectionService {
constructor() {
super('postgres://postgres:LoicPoullain@localhost:5432/foal_test_db');
}
}
@Service()
export ... | import { Service } from '@foal/core';
import { Sequelize, SequelizeConnectionService, SequelizeService } from '@foal/sequelize';
export interface User {
firstName: string;
lastName: string;
}
@Service()
export class Connection extends SequelizeConnectionService {
constructor() {
super('postgres://postgres:L... | Fix sequelize generic class issue in @foal/examples | Fix sequelize generic class issue in @foal/examples
| TypeScript | mit | FoalTS/foal,FoalTS/foal,FoalTS/foal,FoalTS/foal | ---
+++
@@ -1,5 +1,10 @@
import { Service } from '@foal/core';
import { Sequelize, SequelizeConnectionService, SequelizeService } from '@foal/sequelize';
+
+export interface User {
+ firstName: string;
+ lastName: string;
+}
@Service()
export class Connection extends SequelizeConnectionService {
@@ -9,7 +14,7... |
a1fa3d0be5b14070c35232180da861923306107f | packages/components/containers/referral/rewards/table/ActivityCell.tsx | packages/components/containers/referral/rewards/table/ActivityCell.tsx | import { c } from 'ttag';
import { Referral, ReferralState } from '@proton/shared/lib/interfaces';
interface Props {
referral: Referral;
}
const ActivityCell = ({ referral }: Props) => {
let message: React.ReactNode = null;
switch (referral.State) {
case ReferralState.INVITED:
message... | import { c } from 'ttag';
import { Referral, ReferralState } from '@proton/shared/lib/interfaces';
interface Props {
referral: Referral;
}
const ActivityCell = ({ referral }: Props) => {
let message: React.ReactNode = null;
switch (referral.State) {
case ReferralState.INVITED:
message... | Add dynamic months to actity cell message | Add dynamic months to actity cell message
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -28,7 +28,7 @@
? // translator : We are in a table cell. We inform user that a referred user has paid for a monthly plan
c('Info').t`Paid for a monthly plan`
: // translator : We are in a table cell. We inform user that a referred user has pa... |
c923621226e0b5626f00d0bb9d42b7477f321d83 | polygerrit-ui/app/services/flags/flags.ts | polygerrit-ui/app/services/flags/flags.ts | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Add experiment for showing check results in diffs | Add experiment for showing check results in diffs
Change-Id: If5b657bf2658109c9b0fd69ef9a5b87f5b7e220c
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -30,4 +30,5 @@
CHECKS_DEVELOPER = 'UiFeature__checks_developer',
SUBMIT_REQUIREMENTS_UI = 'UiFeature__submit_requirements_ui',
TOPICS_PAGE = 'UiFeature__topics_page',
+ CHECK_RESULTS_IN_DIFFS = 'UiFeature__check_results_in_diffs',
} |
d6b1a70910906aa2b2ea9004efffe1b456c39a35 | src/LondonTravel.Site/assets/scripts/ts/Swagger.ts | src/LondonTravel.Site/assets/scripts/ts/Swagger.ts | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
declare var SwaggerUIBundle: any;
declare var SwaggerUIStandalonePreset: any;
function HideTopbarPlugin(): any {
return {
components... | // Copyright (c) Martin Costello, 2017. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.
declare var SwaggerUIBundle: any;
declare var SwaggerUIStandalonePreset: any;
function HideTopbarPlugin(): any {
return {
components... | Enable Try It Out by default | Enable Try It Out by default
Automatically enable the Try It Out functionality in the OpenAPI pages.
| TypeScript | apache-2.0 | martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site,martincostello/alexa-london-travel-site | ---
+++
@@ -36,6 +36,7 @@
jsonEditor: true,
showRequestHeaders: true,
supportedSubmitMethods: ["get"],
+ tryItOutEnabled: true,
validatorUrl: null,
responseInterceptor: (response: any): any => {
// Delete overly-verbose heade... |
5cf588a1b3dbc8cd8e479236e0228bb4044afc37 | src/app/leaflet-button/leaflet-button.component.ts | src/app/leaflet-button/leaflet-button.component.ts | /*!
* Leaflet Button Component
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { Component, OnInit, Input, Output, ViewChild, EventEmitter } from '@angular/core';
@Component({
selector: 'app-leaflet-button',
templateUrl: './leaflet-button.component.html',
... | /*!
* Leaflet Button Component
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { Component, OnInit, Input, Output, ViewChild, EventEmitter } from '@angular/core';
@Component({
selector: 'app-leaflet-button',
templateUrl: './leaflet-button.component.html',
... | Add check if not empty | Add check if not empty
| TypeScript | mit | ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2,ecsnavarretemit/sarai-interactive-maps,ecsnavarretemit/sarai-ng2 | ---
+++
@@ -20,7 +20,7 @@
constructor() { }
ngOnInit() {
- if (typeof this.controlClass !== 'undefined') {
+ if (typeof this.controlClass !== 'undefined' && this.controlClass !== '') {
let split = this.controlClass.split(' ');
// add the class to the content |
c29ea6e4906c466f550c1bd12d27ceb1f12de10e | packages/react-sequential-id/src/index.ts | packages/react-sequential-id/src/index.ts | import {
Component,
ComponentElement,
createContext,
createElement as r,
Props,
ReactElement,
ReactPortal,
SFCElement,
} from 'react'
import uniqueid = require('uniqueid')
export interface IIdProviderProps {
factory?: () => string
}
export interface ISequentialIdProps {
children?: (id: string) => ... | import {
Component,
ComponentElement,
createContext,
createElement as r,
Props,
ReactElement,
ReactPortal,
SFCElement,
} from 'react'
import uniqueid = require('uniqueid')
export interface IIdProviderProps {
factory?: () => string
}
export interface ISequentialIdProps {
children?: (id: string) => ... | Make SequentialId a named export as well as the default export | Make SequentialId a named export as well as the default export
| TypeScript | mit | thirdhand/components,thirdhand/components | ---
+++
@@ -27,7 +27,7 @@
return r(IdContext.Provider, { value: factory }, children)
}
-function SequentialId(props: ISequentialIdProps) {
+export function SequentialId(props: ISequentialIdProps) {
const { children = () => null } = props
if (typeof children !== 'function') {
return null |
ebb8d80d1182319ee49feb3e11f8fe45751b6034 | client/InitiativeList/CombatantRow.tsx | client/InitiativeList/CombatantRow.tsx | import * as React from "react";
import { CombatantState } from "../../common/CombatantState";
export function CombatantRow(props: {
combatantState: CombatantState;
isActive: boolean;
isSelected: boolean;
showIndexLabel: boolean;
}) {
const displayName = props.combatantState.Alias.length
? props.combatan... | import * as React from "react";
import { CombatantState } from "../../common/CombatantState";
export function CombatantRow(props: {
combatantState: CombatantState;
isActive: boolean;
isSelected: boolean;
showIndexLabel: boolean;
}) {
const classNames = ["combatant"];
if (props.isActive) {
classNames.p... | Add active and selected classNames to combatant | Add active and selected classNames to combatant
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -8,13 +8,21 @@
isSelected: boolean;
showIndexLabel: boolean;
}) {
+ const classNames = ["combatant"];
+ if (props.isActive) {
+ classNames.push("active");
+ }
+ if (props.isSelected) {
+ classNames.push("selected");
+ }
+
const displayName = props.combatantState.Alias.length
? pro... |
f1a882a5dc8eff0f6efa8f302bfa0ee0beab4800 | capstone-project/src/main/angular-webapp/src/app/mock-http-interceptor.ts | capstone-project/src/main/angular-webapp/src/app/mock-http-interceptor.ts | import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable, of } from "rxjs";
import { BlobAction } from "./blob-action";
// Mock the HttpClient's interceptor so that HTTP requests are handled locally and no... | import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Observable, of } from "rxjs";
import { BlobAction } from "./blob-action";
// Mock the HttpClient's interceptor so that HTTP requests are handled locally and no... | Make constants in MockHttpInterceptor static | Make constants in MockHttpInterceptor static
| TypeScript | apache-2.0 | googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020,googleinterns/step263-2020 | ---
+++
@@ -7,10 +7,10 @@
@Injectable()
export class MockHttpInterceptor implements HttpInterceptor {
- private responseUrl = {
+ private static responseUrl = {
imageUrl: "imageUrl"
}
- private responseKey = {
+ private static responseKey = {
blobKey: "blobKey"
}
@@ -20,10 +20,10 @@
inter... |
4a96b42d61c9c08ac649d207557af04c96c990ad | src/app/reuse-strategy.ts | src/app/reuse-strategy.ts | import {
ActivatedRouteSnapshot,
DetachedRouteHandle,
RouteReuseStrategy,
} from '@angular/router';
/* reuse the SearchComponent instead of recreating it */
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
private detachedRouteHandle: DetachedRouteHandle;
shouldDetach(route: ActivatedRo... | import {
ActivatedRouteSnapshot,
DetachedRouteHandle,
RouteReuseStrategy,
} from '@angular/router';
/* reuse the SearchComponent instead of recreating it */
export class CustomRouteReuseStrategy implements RouteReuseStrategy {
private detachedRouteHandle: DetachedRouteHandle;
shouldDetach(route: ActivatedRo... | Fix a bug in RouteReuseStrategy | Fix a bug in RouteReuseStrategy
| TypeScript | mit | ksmai/spotify-clone,ksmai/spotify-clone,ksmai/spotify-clone | ---
+++
@@ -9,14 +9,16 @@
private detachedRouteHandle: DetachedRouteHandle;
shouldDetach(route: ActivatedRouteSnapshot): boolean {
- return route.url.length === 0;
+ return route.routeConfig.path === '';
}
store(
route: ActivatedRouteSnapshot,
detachedTree: DetachedRouteHandle,
): v... |
155f428f2debd2729eb0972a2795998095f431bf | front/src/app/shared/base.service.ts | front/src/app/shared/base.service.ts | import { Injectable } from '@angular/core';
import { Error } from './error/error';
import { Response } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import { environment } from '../../environments/environment';
@Injectable()
export class BaseService {
private static DEFAULT_ERROR = 'Something went hor... | import { Injectable } from '@angular/core';
import { Error } from './error/error';
import { Response } from '@angular/http';
import { Observable } from 'rxjs/Rx';
import { environment } from '../../environments/environment';
@Injectable()
export class BaseService {
private static DEFAULT_ERROR = 'Something went hor... | Use funny default details in error message | Use funny default details in error message
| TypeScript | mit | Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy,Crunchy-Torch/coddy | ---
+++
@@ -8,6 +8,7 @@
export class BaseService {
private static DEFAULT_ERROR = 'Something went horribly wrong...';
+ private static DEFAULT_DETAILS = 'A team of highly trained monkeys has been dispatched to deal with this situation.'
protected extractArray(res: Response) {
let body = res.json();
@... |
c4971f5d62cc09a3d1d6356822f494697d602776 | projects/angular2-cookie-law/src/lib/angular2-cookie-law.service.ts | projects/angular2-cookie-law/src/lib/angular2-cookie-law.service.ts | /**
* angular2-cookie-law
*
* Copyright 2016-2018, @andreasonny83, All rights reserved.
*
* @author: @andreasonny83 <andreasonny83@gmail.com>
*/
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class Angular2CookieLawService {
public seen(cookieName: string = 'cookieLaw... | /**
* angular2-cookie-law
*
* Copyright 2016-2018, @andreasonny83, All rights reserved.
*
* @author: @andreasonny83 <andreasonny83@gmail.com>
*/
import { Inject, Injectable, PLATFORM_ID } from '@angular/core';
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
@Injectable({
providedIn: 'root'
})
e... | Fix Angular2CookieLawService to be compatible with Angular Universal | Fix Angular2CookieLawService to be compatible with Angular Universal
| TypeScript | mit | andreasonny83/angular2-cookie-law,andreasonny83/angular2-cookie-law,andreasonny83/angular2-cookie-law | ---
+++
@@ -6,14 +6,25 @@
* @author: @andreasonny83 <andreasonny83@gmail.com>
*/
-import { Injectable } from '@angular/core';
+import { Inject, Injectable, PLATFORM_ID } from '@angular/core';
+import { DOCUMENT, isPlatformBrowser } from '@angular/common';
@Injectable({
providedIn: 'root'
})
export class... |
e85e9cc8c9e340c171c0ad871e635547c883611b | webpack/__test_support__/fake_resource.ts | webpack/__test_support__/fake_resource.ts | import {
Resource as Res,
ResourceName as Name,
SpecialStatus,
TaggedResource
} from "farmbot";
import { generateUuid } from "../resources/util";
let ID_COUNTER = 0;
export function fakeResource<T extends Name,
U extends TaggedResource["body"]>(kind: T, body: U): Res<T, U> {
return {
specialStatus: Sp... | import { Resource as Res, TaggedResource } from "farmbot";
import { arrayUnwrap } from "../resources/util";
import { newTaggedResource } from "../sync/actions";
export function fakeResource<T extends TaggedResource>(kind: T["kind"],
body: T["body"]): Res<T["kind"], T["body"]> {
return arrayUnwrap(newTaggedResource... | Fix log test. TODO: Huge type errors | Fix log test. TODO: Huge type errors
| TypeScript | mit | RickCarlino/farmbot-web-app,FarmBot/farmbot-web-app,gabrielburnworth/Farmbot-Web-App,RickCarlino/farmbot-web-app,FarmBot/Farmbot-Web-API,FarmBot/farmbot-web-app,FarmBot/Farmbot-Web-API,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,gabrielburnworth/Farmbot-Web-App,FarmBot/Farmbot-Web-API,FarmBot/farm... | ---
+++
@@ -1,19 +1,8 @@
-import {
- Resource as Res,
- ResourceName as Name,
- SpecialStatus,
- TaggedResource
-} from "farmbot";
-import { generateUuid } from "../resources/util";
+import { Resource as Res, TaggedResource } from "farmbot";
+import { arrayUnwrap } from "../resources/util";
+import { newTaggedRes... |
9a8153718990fbcdbacc4ea62c45b95762933a97 | src/Apps/Artwork/Components/TrustSignals/__stories__/TrustSignals.story.tsx | src/Apps/Artwork/Components/TrustSignals/__stories__/TrustSignals.story.tsx | import { SecurePayment_artwork } from "__generated__/SecurePayment_artwork.graphql"
import React from "react"
import { storiesOf } from "storybook/storiesOf"
import { Section } from "Utils/Section"
import { SecurePayment } from "../SecurePayment"
storiesOf("Apps/Artwork/Components", module).add("Trust Signals", () => ... | import { Flex } from "@artsy/palette"
import { AuthenticityCertificate_artwork } from "__generated__/AuthenticityCertificate_artwork.graphql"
import { SecurePayment_artwork } from "__generated__/SecurePayment_artwork.graphql"
import { VerifiedSeller_artwork } from "__generated__/VerifiedSeller_artwork.graphql"
import R... | Add sotries for other trust signals | Add sotries for other trust signals
| TypeScript | mit | xtina-starr/reaction,artsy/reaction,artsy/reaction,xtina-starr/reaction,artsy/reaction-force,xtina-starr/reaction,xtina-starr/reaction,artsy/reaction,artsy/reaction-force | ---
+++
@@ -1,20 +1,55 @@
+import { Flex } from "@artsy/palette"
+import { AuthenticityCertificate_artwork } from "__generated__/AuthenticityCertificate_artwork.graphql"
import { SecurePayment_artwork } from "__generated__/SecurePayment_artwork.graphql"
+import { VerifiedSeller_artwork } from "__generated__/Verified... |
96d9393e65ba50198632a39f35bb9293660ebb8d | src/utils/search.ts | src/utils/search.ts | import { SearchResult, TOpticonMap } from '../types';
import { SearchSuccess } from '../actions/search';
export const updateTurkopticon = (data: TOpticonMap) => (
hit: SearchResult
): SearchResult => ({
...hit,
requester: {
...hit.requester,
turkopticon: data.get(hit.requester.id)
}
});
e... | import { SearchResult, TOpticonMap } from '../types';
import { SearchSuccess } from '../actions/search';
export const updateTurkopticon = (data: TOpticonMap) => (
hit: SearchResult
): SearchResult => ({
...hit,
requester: {
...hit.requester,
turkopticon: data.get(hit.requester.id)
}
});
e... | Use implicit object return syntax. | Use implicit object return syntax.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -15,9 +15,9 @@
!hit.groupId.startsWith('[Error:');
/**
- * Returns true if a search result in a successful search has an entry that
- * exists in prevSearchResult.
- * @param action
+ * Returns true if a search result in a successful search has an entry that
+ * exists in prevSearchResult.
+ * @pa... |
62d7f8370b73f5c353185eb763cbdae78fdbf73b | src/flutter/daemon_message_handler.ts | src/flutter/daemon_message_handler.ts | import { ExtensionContext, window } from "vscode";
import { getChannel } from "../commands/channels";
import { logError } from "../utils/log";
import { FlutterDaemon } from "./flutter_daemon";
import { LogMessage, ShowMessage } from "./flutter_types";
export function setUpDaemonMessageHandler(context: ExtensionContext... | import { ExtensionContext, window } from "vscode";
import { getChannel } from "../commands/channels";
import { logWarn } from "../utils/log";
import { FlutterDaemon } from "./flutter_daemon";
import { LogMessage, ShowMessage } from "./flutter_types";
export function setUpDaemonMessageHandler(context: ExtensionContext,... | Fix for log change before rebase | Fix for log change before rebase
| TypeScript | mit | Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code,Dart-Code/Dart-Code | ---
+++
@@ -1,6 +1,6 @@
import { ExtensionContext, window } from "vscode";
import { getChannel } from "../commands/channels";
-import { logError } from "../utils/log";
+import { logWarn } from "../utils/log";
import { FlutterDaemon } from "./flutter_daemon";
import { LogMessage, ShowMessage } from "./flutter_type... |
60866568f29422ca66bd220e9702298f8aefafeb | src/createLocation.ts | src/createLocation.ts | import * as messages from '@cucumber/messages'
export default function createLocation(props: {
line?: number
column?: number
}): messages.Location {
const location: messages.Location = { ...props }
if (location.line === 0) {
location.line = undefined
}
if (location.column === 0) {
location.column =... | import * as messages from '@cucumber/messages'
export default function createLocation(props: {
line: number
column?: number
}): messages.Location {
return { ...props }
}
| Change schema to make more properties required | Change schema to make more properties required
| TypeScript | mit | cucumber/gherkin-javascript,cucumber/gherkin-javascript | ---
+++
@@ -1,16 +1,8 @@
import * as messages from '@cucumber/messages'
export default function createLocation(props: {
- line?: number
+ line: number
column?: number
}): messages.Location {
- const location: messages.Location = { ...props }
- if (location.line === 0) {
- location.line = undefined
- }... |
3c4c67365c3857679d21c90c7c0c9de22b85bfd1 | src/emitter/source.ts | src/emitter/source.ts | import { EmitResult, emit } from './';
import { Context } from '../contexts';
import { SourceFile } from 'typescript';
export const emitSourceFile = (node: SourceFile, context): EmitResult =>
node.statements
.reduce((result, node) => {
const emit_result = emit(node, context);
emit_result.emitted_stri... | import { EmitResult, emit } from './';
import { Context } from '../contexts';
import { SourceFile } from 'typescript';
export const emitSourceFile = (node: SourceFile, context: Context): EmitResult =>
node.statements
.reduce<EmitResult>(({ context, emitted_string }, node) => {
const result = emit(node, con... | Fix issue with context not being updated | Fix issue with context not being updated
| TypeScript | mit | AmnisIO/typewriter,AmnisIO/typewriter,AmnisIO/typewriter | ---
+++
@@ -2,10 +2,10 @@
import { Context } from '../contexts';
import { SourceFile } from 'typescript';
-export const emitSourceFile = (node: SourceFile, context): EmitResult =>
+export const emitSourceFile = (node: SourceFile, context: Context): EmitResult =>
node.statements
- .reduce((result, node) => {... |
2e0142f8a9afb756c56211c9214880ed48bb6e1f | src/app/bootstrap.ts | src/app/bootstrap.ts | import '../lib/gj-lib-client/utils/polyfills';
import './main.styl';
import { store } from './store/index';
import { router } from './views/index';
import { App } from './app';
import { bootstrapShortkey } from '../lib/gj-lib-client/vue/shortkey';
import { Registry } from '../lib/gj-lib-client/components/registry/regi... | import { Ads } from '../lib/gj-lib-client/components/ad/ads.service';
import { GamePlayModal } from '../lib/gj-lib-client/components/game/play-modal/play-modal.service';
import { Registry } from '../lib/gj-lib-client/components/registry/registry.service';
import '../lib/gj-lib-client/utils/polyfills';
import { bootstra... | Set registry to store more users. | Set registry to store more users.
| TypeScript | mit | gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt,gamejolt/gamejolt | ---
+++
@@ -1,14 +1,13 @@
+import { Ads } from '../lib/gj-lib-client/components/ad/ads.service';
+import { GamePlayModal } from '../lib/gj-lib-client/components/game/play-modal/play-modal.service';
+import { Registry } from '../lib/gj-lib-client/components/registry/registry.service';
import '../lib/gj-lib-client/uti... |
5afe9ca2752d8f92f099dd2e1c11a76b28a9c1ab | lib/msal-browser/src/event/EventMessage.ts | lib/msal-browser/src/event/EventMessage.ts | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { AuthenticationResult, AuthError, CommonEndSessionRequest } from "@azure/msal-common";
import { EventType } from "./EventType";
import { InteractionType } from "../utils/BrowserConstants";
import { PopupReque... | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { AuthenticationResult, AuthError } from "@azure/msal-common";
import { EventType } from "./EventType";
import { InteractionType } from "../utils/BrowserConstants";
import { PopupRequest, RedirectRequest, Sile... | Update request type in `angular` | Update request type in `angular`
| TypeScript | mit | AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication-library-for-js,AzureAD/microsoft-authentication... | ---
+++
@@ -3,10 +3,10 @@
* Licensed under the MIT License.
*/
-import { AuthenticationResult, AuthError, CommonEndSessionRequest } from "@azure/msal-common";
+import { AuthenticationResult, AuthError } from "@azure/msal-common";
import { EventType } from "./EventType";
import { InteractionType } from "../uti... |
d6df1876c805eebc765aa23c73dd1c356ef82531 | lib/core-server/src/utils/output-stats.ts | lib/core-server/src/utils/output-stats.ts | import chalk from 'chalk';
import path from 'path';
import { logger } from '@storybook/node-logger';
import { Stats } from 'webpack';
import fs from 'fs-extra';
export async function outputStats(directory: string, previewStats?: any, managerStats?: any) {
if (previewStats) {
const filePath = await writeStats(di... | import chalk from 'chalk';
import path from 'path';
import { logger } from '@storybook/node-logger';
import { Stats } from 'webpack';
import fs from 'fs-extra';
export async function outputStats(directory: string, previewStats?: any, managerStats?: any) {
if (previewStats) {
const filePath = await writeStats(di... | Create directory for stats files if it doesn't exist | Create directory for stats files if it doesn't exist
| TypeScript | mit | storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook,storybooks/storybook | ---
+++
@@ -18,6 +18,6 @@
export const writeStats = async (directory: string, name: string, stats: Stats) => {
const filePath = path.join(directory, `${name}-stats.json`);
- await fs.writeFile(filePath, JSON.stringify(stats.toJson(), null, 2), 'utf8');
+ await fs.outputFile(filePath, JSON.stringify(stats.toJs... |
992a927d5dff73a8b8a4e80647edb7747a060b26 | src/requests/fetchQueue.ts | src/requests/fetchQueue.ts | import { Dispatch } from 'react-redux';
import { Hit, Requester } from '../types';
import { Map } from 'immutable';
import {
HitPageAction,
getHitPageSuccess,
getHitPageFailure
} from '../actions/hits';
import {
TOpticonAction,
fetchTOpticonSuccess,
fetchTOpticonFailure
} from '../actions/turkop... | import { Dispatch } from 'react-redux';
import { Hit } from '../types';
import { Map } from 'immutable';
import { fetchQueueSuccess, fetchQueueFailure, QueueAction } from '../actions/queue';
export const fetchQueue = (dispatch: Dispatch<QueueAction>) => async () => {
try {
const queueData = await Promise.... | Add function to make network requests for fetching a queue page. | Add function to make network requests for fetching a queue page.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -1,67 +1,17 @@
import { Dispatch } from 'react-redux';
-import { Hit, Requester } from '../types';
+import { Hit } from '../types';
import { Map } from 'immutable';
-import {
- HitPageAction,
- getHitPageSuccess,
- getHitPageFailure
-} from '../actions/hits';
-import {
- TOpticonAction,
- fetchTOpti... |
93d5d645d3c2dcf32f2d199d14e0208e9d85a889 | types/async-retry/index.d.ts | types/async-retry/index.d.ts | // Type definitions for async-retry 1.2
// Project: https://github.com/zeit/async-retry#readme
// Definitions by: Albert Wu <https://github.com/albertywu>
// Pablo Rodríguez <https://github.com/MeLlamoPablo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function AsyncRetry<... | // Type definitions for async-retry 1.2
// Project: https://github.com/zeit/async-retry#readme
// Definitions by: Albert Wu <https://github.com/albertywu>
// Pablo Rodríguez <https://github.com/MeLlamoPablo>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare function AsyncRetry<... | Remove retry from the AsyncRetry namespace | Remove retry from the AsyncRetry namespace
| TypeScript | mit | georgemarshall/DefinitelyTyped,one-pieces/DefinitelyTyped,magny/DefinitelyTyped,AgentME/DefinitelyTyped,AgentME/DefinitelyTyped,markogresak/DefinitelyTyped,AgentME/DefinitelyTyped,georgemarshall/DefinitelyTyped,magny/DefinitelyTyped,rolandzwaga/DefinitelyTyped,dsebastien/DefinitelyTyped,AgentME/DefinitelyTyped,georgema... | ---
+++
@@ -10,8 +10,6 @@
): Promise<A>;
declare namespace AsyncRetry {
- function retry<A>(fn: RetryFunction<A>, opts: Options): Promise<A>;
-
interface Options {
retries?: number;
factor?: number; |
9678199ae0909d5ff7c3d82469ea46e8bbce968e | src/pages/home-page/home-page.component.ts | src/pages/home-page/home-page.component.ts | import { Component, OnInit } from '@angular/core';
import { AppService } from '../../shared/app.service';
import { TranslateService } from '@ngx-translate/core';
let readme = require('html-loader!markdown-loader!./../../../README.md');
@Component({
selector: 'home-page',
templateUrl: './home-page.componen... | import { Component, OnInit } from '@angular/core';
import { AppService } from '../../shared/app.service';
import { TranslateService } from '@ngx-translate/core';
@Component({
selector: 'home-page',
templateUrl: './home-page.component.html',
styleUrls: ['./home-page.component.scss']
})
export class Hom... | Remove include README.md on home page | fix(home-page): Remove include README.md on home page
| TypeScript | mit | site15/rucken,site15/rucken,rucken/core,site15/rucken,site15/rucken,rucken/core,rucken/core,rucken/core | ---
+++
@@ -1,8 +1,6 @@
import { Component, OnInit } from '@angular/core';
import { AppService } from '../../shared/app.service';
import { TranslateService } from '@ngx-translate/core';
-
-let readme = require('html-loader!markdown-loader!./../../../README.md');
@Component({
selector: 'home-page',
@@ -13,7 +... |
f504fd07f880149161a7d20149ad13f9e2ff5d3f | src/Types.ts | src/Types.ts | /**
* Types.ts
* Author: David de Regt
* Copyright: Microsoft 2016
*
* Shared basic types for ReSub.
*/
export type SubscriptionCallbackFunction = { (keys?: string[]): void; }
export type SubscriptionCallbackBuildStateFunction<S> = { (keys?: string[]): S | void; }
export interface StoreSubscription<S> {
store: an... | /**
* Types.ts
* Author: David de Regt
* Copyright: Microsoft 2016
*
* Shared basic types for ReSub.
*/
import { StoreBase } from './StoreBase';
export type SubscriptionCallbackFunction = { (keys?: string[]): void; }
export type SubscriptionCallbackBuildStateFunction<S> = { (keys?: string[]): S | void; }
export inter... | Update typings on StoreSubscription to properly use StoreBase | Update typings on StoreSubscription to properly use StoreBase
| TypeScript | mit | berickson1/ReSub,berickson1/ReSub,berickson1/ReSub | ---
+++
@@ -6,11 +6,12 @@
* Shared basic types for ReSub.
*/
+import { StoreBase } from './StoreBase';
export type SubscriptionCallbackFunction = { (keys?: string[]): void; }
export type SubscriptionCallbackBuildStateFunction<S> = { (keys?: string[]): S | void; }
export interface StoreSubscription<S> {
- ... |
ad843c6397a12db25539fea020156ed34c999fb1 | src/app/common/first-letter.pipe.spec.ts | src/app/common/first-letter.pipe.spec.ts | import {FirstLetterPipe} from './first-letter.pipe';
fdescribe('FirstLetterPipe', () => {
it('should return empty string for null', () => {
const pipe = new FirstLetterPipe();
const val = pipe.transform(null);
expect(val).toEqual('');
});
it('should return empty string for undefined', () => {
co... | import {FirstLetterPipe} from './first-letter.pipe';
describe('FirstLetterPipe', () => {
it('should return empty string for null', () => {
const pipe = new FirstLetterPipe();
const val = pipe.transform(null);
expect(val).toEqual('');
});
it('should return empty string for undefined', () => {
con... | Remove focused describe from first letter pipe unit test | app: Remove focused describe from first letter pipe unit test
| TypeScript | mit | lukaszkostrzewa/graphy,lukaszkostrzewa/graphy,lukaszkostrzewa/graphy | ---
+++
@@ -1,6 +1,6 @@
import {FirstLetterPipe} from './first-letter.pipe';
-fdescribe('FirstLetterPipe', () => {
+describe('FirstLetterPipe', () => {
it('should return empty string for null', () => {
const pipe = new FirstLetterPipe();
const val = pipe.transform(null); |
f2f518c4ed1312e96a97529f5e103d7e912f5869 | src/app/paginator/paginator.component.ts | src/app/paginator/paginator.component.ts | import {
Component,
Input,
Output,
EventEmitter,
OnInit,
OnChanges,
SimpleChange
} from '@angular/core';
@Component({
selector: 'mrs-paginator',
template: require('./paginator.component.html'),
styles: [require('./paginator.component.scss')]
})
export class PaginatorComponent implements OnInit, OnC... | import {
Component,
Input,
Output,
EventEmitter,
OnInit,
OnChanges,
SimpleChange
} from '@angular/core';
@Component({
selector: 'mrs-paginator',
template: require('./paginator.component.html'),
styles: [require('./paginator.component.scss')]
})
export class PaginatorComponent implements OnInit, OnC... | Test if object exist before acessing it in paginator onChange | Test if object exist before acessing it in paginator onChange
| TypeScript | mit | SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend,SBats/marvel-reading-stats-frontend | ---
+++
@@ -28,7 +28,9 @@
}
ngOnChanges(changes: {[propName: string]: SimpleChange}): void {
- this.setPageList(changes['pageQuantity'].currentValue);
+ if (changes['pageQuantity']) {
+ this.setPageList(changes['pageQuantity'].currentValue);
+ }
}
setPageList(pageQuantity): void { |
fa95641f88df107abd17d8218272b40888e8535c | src/client/app/common/scripts/get-kao.ts | src/client/app/common/scripts/get-kao.ts | export default () => [
'(=^・・^=)',
'v(\'ω\')v',
'🐡( \'-\' 🐡 )フグパンチ!!!!',
'🖕(´・_・`)🖕'
][Math.floor(Math.random() * 4)];
| const kaos = [
'(=^・・^=)',
'v(\'ω\')v',
'🐡( \'-\' 🐡 )フグパンチ!!!!',
'🖕(´・_・`)🖕',
];
export default () => kaos[Math.floor(Math.random() * kaos.length)];
| Use Array.prototype.length to avoid magic number | Use Array.prototype.length to avoid magic number
| TypeScript | mit | Tosuke/misskey,ha-dai/Misskey,syuilo/Misskey,syuilo/Misskey,Tosuke/misskey,Tosuke/misskey,ha-dai/Misskey,Tosuke/misskey,Tosuke/misskey | ---
+++
@@ -1,6 +1,8 @@
-export default () => [
+const kaos = [
'(=^・・^=)',
'v(\'ω\')v',
'🐡( \'-\' 🐡 )フグパンチ!!!!',
- '🖕(´・_・`)🖕'
-][Math.floor(Math.random() * 4)];
+ '🖕(´・_・`)🖕',
+];
+
+export default () => kaos[Math.floor(Math.random() * kaos.length)]; |
e5f0ee373b66063f9304cd93ae4875aed5346138 | src/index.ts | src/index.ts | import { ConfigService } from './config.service';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
export * from './log.service';
export function fatoryConfig(isProduction: boolean): ConfigService {
return {
isProduction: isProduction
};
}
@NgModu... | import { ConfigService } from './config.service';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
import { LogService } from './log.service';
export * from './log.service';
export function fatoryConfig(isProduction: boolean): ConfigService {
return {
... | Fix add LogService to providers | Fix add LogService to providers
| TypeScript | mit | nguyentk90/ngx-log,nguyentk90/ngx-log | ---
+++
@@ -1,6 +1,7 @@
import { ConfigService } from './config.service';
import { NgModule, ModuleWithProviders } from '@angular/core';
import { CommonModule } from '@angular/common';
+import { LogService } from './log.service';
export * from './log.service';
@@ -19,6 +20,9 @@
],
exports: [
+ ],
+ ... |
9da964f019b60880516d549b39849caf23e97a89 | scripts/tslint/typeOperatorSpacingRule.ts | scripts/tslint/typeOperatorSpacingRule.ts | /// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
export class Rule extends Lint.Rules.AbstractRule {
public static FAILURE_STRING = "Place spaces around the '|' and '&' type operators";;
public apply(s... | /// <reference path="../../node_modules/tslint/typings/typescriptServices.d.ts" />
/// <reference path="../../node_modules/tslint/lib/tslint.d.ts" />
export class Rule extends Lint.Rules.AbstractRule {
public static FAILURE_STRING = "Place spaces around the '|' and '&' type operators";
public apply(so... | Remove extra semicolon (the irony) | Remove extra semicolon (the irony)
| TypeScript | apache-2.0 | weswigham/TypeScript,donaldpipowitch/TypeScript,samuelhorwitz/typescript,alexeagle/TypeScript,vilic/TypeScript,alexeagle/TypeScript,TukekeSoft/TypeScript,donaldpipowitch/TypeScript,fabioparra/TypeScript,mihailik/TypeScript,thr0w/Thr0wScript,blakeembrey/TypeScript,kimamula/TypeScript,basarat/TypeScript,erikmcc/TypeScrip... | ---
+++
@@ -3,7 +3,7 @@
export class Rule extends Lint.Rules.AbstractRule {
- public static FAILURE_STRING = "Place spaces around the '|' and '&' type operators";;
+ public static FAILURE_STRING = "Place spaces around the '|' and '&' type operators";
public apply(sourceFile: ts.SourceFile): Lint.Rul... |
dfad6c77093888cb596a3e0f288891a764632980 | src/app/components/test.component.ts | src/app/components/test.component.ts | import { Component } from '../infrastructure/component';
export class TestComponent extends Component {
tag(): string {
return 'test';
}
template(): string {
return '<h1>This component is a little test to start the project !</h1>';
}
} | import { Component } from '../infrastructure/component';
import { VirtualDOM } from "../infrastructure/dom";
export class TestComponent extends Component {
tag(): string {
return 'test';
}
template(): VirtualDOM {
return {
tag: 'test',
childs: [{
... | Rewrite template return of TestComponent | Rewrite template return of TestComponent
| TypeScript | mit | Vtek/frameworkless,Vtek/frameworkless,Vtek/frameworkless | ---
+++
@@ -1,10 +1,38 @@
import { Component } from '../infrastructure/component';
+import { VirtualDOM } from "../infrastructure/dom";
export class TestComponent extends Component {
tag(): string {
return 'test';
}
- template(): string {
- return '<h1>This component is a little test ... |
bd7dc86c1252d4ecb623c5ad5638baf588edc214 | app/services/lastfm.ts | app/services/lastfm.ts | import {Request} from '../libs/request';
let API_ROOT = 'ws.audioscrobbler.com'
let API_VERSION = '2.0'
let API_KEY = '59f553e943f2ea7c9e83f19e113b21b8'
export class LastFMClient {
apiRoot: string
protocol: string = 'http://'
request: Request;
constructor() {
this.request = Request.getInstance()
th... | import {Request} from '../libs/request';
let API_ROOT = 'ws.audioscrobbler.com'
let API_VERSION = '2.0'
let API_KEY = '59f553e943f2ea7c9e83f19e113b21b8'
export class LastFMClient {
apiRoot: string
protocol: string = 'http://'
request: Request;
constructor() {
this.request = Request.getInstance()
th... | Use GET request instead of JSONP and parse JSON | Use GET request instead of JSONP and parse JSON
Since LastFM allow CORS Request
| TypeScript | mit | yadomi/lastagram,yadomi/lastagram,yadomi/lastagram | ---
+++
@@ -16,9 +16,10 @@
this.apiRoot = [this.protocol, API_ROOT, API_VERSION].join('/')
}
- geEvent(location){
+ getEvents(location){
let endpoint = `?method=geo.getevents&location=${location}&api_key=${API_KEY}&format=json`
- return this.request.jsonp(this.apiRoot + endpoint)
+ console.log(... |
432958e814c7af4f5670f134b7a310adf47b44ce | src/parsers/index.ts | src/parsers/index.ts | export type ParserInput = any;
export type ParseFn<T> = (x: ParserInput) => T;
export class ParserError extends Error {
constructor(
public readonly expected: string,
public readonly found: string
) {
super(`Expected ${expected} but found ${found}`);
}
}
export function parse<T>(input: ParserInput, ... | /**
* A `ParseInput` can be transformed using a `ParseFn`.
*/
export type ParserInput = any;
/**
* A `ParseFn` transforms a `ParseInput` to type `T`. It must throw a `ParseError` if the transformation can not be
* done.
*/
export type ParseFn<T> = (x: ParserInput) => T;
/**
* A `ParseFn` throws a `ParseError` w... | Add Documentation to Parser Types | docs(type): Add Documentation to Parser Types
Give the documentation of ParseInput, ParseFn, ParseError and parse some
love ❤️
| TypeScript | mit | swissmanu/spicery,swissmanu/spicery,swissmanu/spicery | ---
+++
@@ -1,6 +1,17 @@
+/**
+ * A `ParseInput` can be transformed using a `ParseFn`.
+ */
export type ParserInput = any;
+
+/**
+ * A `ParseFn` transforms a `ParseInput` to type `T`. It must throw a `ParseError` if the transformation can not be
+ * done.
+ */
export type ParseFn<T> = (x: ParserInput) => T;
+/**... |
d2513fa18a86c3a179b42f046c6e6a0edaf02357 | src/shims/pdfmake.ts | src/shims/pdfmake.ts | import { ENV } from '@waldur/core/services';
// Avoid to re-download the fonts every time pdfmake is used, useful for SPA.
let pdfMakeInstance: any = null;
export async function loadPdfMake() {
if (!pdfMakeInstance) {
const fontFamilies = ENV.fontFamilies;
const pdfMake = (await import(/* webpackChunkName: ... | import { ENV, $http } from '@waldur/core/services';
// Avoid to re-download the fonts every time pdfmake is used, useful for SPA.
let pdfMakeInstance: any = null;
export async function loadPdfMake() {
if (!pdfMakeInstance) {
const fontFamilies = ENV.fontFamilies;
const pdfMake = (await import(/* webpackChun... | Use AngularJS $http service instead of WHATWG fetch for compatibility with IE 10 | Use AngularJS $http service instead of WHATWG fetch for compatibility with IE 10 [WAL-2273]
| TypeScript | mit | opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport,opennode/waldur-homeport | ---
+++
@@ -1,4 +1,4 @@
-import { ENV } from '@waldur/core/services';
+import { ENV, $http } from '@waldur/core/services';
// Avoid to re-download the fonts every time pdfmake is used, useful for SPA.
let pdfMakeInstance: any = null;
@@ -24,22 +24,9 @@
// tslint:disable-next-line: forin
for (const font ... |
0255f2827d1e9b4de4aeef9b1ab9aaffa55b1ee1 | src/app/auth/auth.service.ts | src/app/auth/auth.service.ts | namespace Core {
const DEFAULT_USER: string = 'public';
/**
* @deprecated TODO Temporal type alias to avoid breaking existing code
*/
export type UserDetails = AuthService;
/**
* UserDetails service that represents user credentials and login/logout actions.
*/
export class AuthService {
us... | namespace Core {
const DEFAULT_USER: string = 'public';
/**
* @deprecated TODO Temporal type alias to avoid breaking existing code
*/
export type UserDetails = AuthService;
/**
* UserDetails service that represents user credentials and login/logout actions.
*/
export class AuthService {
pr... | Add loggedIn property and expose only getters for AuthService | Add loggedIn property and expose only getters for AuthService
| TypeScript | apache-2.0 | hawtio/hawtio-core,hawtio/hawtio-core,hawtio/hawtio-core | ---
+++
@@ -12,9 +12,10 @@
*/
export class AuthService {
- username: string = DEFAULT_USER;
- password: string = null;
- token: string = null;
+ private _username: string = DEFAULT_USER;
+ private _password: string = null;
+ private _token: string = null;
+ private _loggedIn: boolean = f... |
11542041993730cb75e652fd66980406ccc7592e | src/utils/hitItem.ts | src/utils/hitItem.ts | import { SearchItem, Requester } from '../types';
import { generateBadges } from './badges';
import { truncate } from './formatting';
type ExceptionStatus = 'neutral' | 'warning' | 'critical';
export interface ExceptionDescriptor {
status?: ExceptionStatus;
title?: string;
description?: string;
}
con... | import { Props as ItemProps } from '@shopify/polaris/types/components/ResourceList/Item';
import { SearchItem, Requester } from '../types';
import { generateBadges } from './badges';
import { truncate } from './formatting';
type ExceptionStatus = 'neutral' | 'warning' | 'critical';
export interface ExceptionDesc... | Add stricter type checking to generateItemProps | Add stricter type checking to generateItemProps
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -1,3 +1,4 @@
+import { Props as ItemProps } from '@shopify/polaris/types/components/ResourceList/Item';
import { SearchItem, Requester } from '../types';
import { generateBadges } from './badges';
import { truncate } from './formatting';
@@ -15,7 +16,10 @@
: [];
};
-export const generateItemProp... |
1dd399dbaed510088c4ddf9bcf0e5235e7ec9b80 | chrome-extension/src/index.ts | chrome-extension/src/index.ts | import * as firebase from "firebase";
import * as url from "url";
const config = require("../config.json");
firebase.initializeApp({
apiKey: config.firebase.apiKey,
authDomain: `${config.firebase.projectId}.firebaseapp.com`,
});
async function getCurrentTabUrl(): Promise<string> {
return await new Promis... | import * as firebase from "firebase";
import * as url from "url";
const config = require("../config.json");
firebase.initializeApp({
apiKey: config.firebase.apiKey,
authDomain: `${config.firebase.projectId}.firebaseapp.com`,
});
async function getCurrentTabUrl(): Promise<string> {
return await new Promis... | Change message when items are added | Change message when items are added
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -19,8 +19,12 @@
const button = document.getElementById("sign-in-button") as HTMLButtonElement;
const message = document.getElementById("message");
- button.addEventListener("click", async () =>
- await firebase.auth().signInWithPopup(new firebase.auth.GithubAuthProvider()));
+ let ... |
0be9d7a8ff62f5f8805108e377e12f41ee017a11 | applications/vpn-settings/src/app/App.tsx | applications/vpn-settings/src/app/App.tsx | import { hot } from 'react-hot-loader/root';
import React from 'react';
import { ProtonApp, useAuthentication, PublicAuthenticationStore, PrivateAuthenticationStore } from 'react-components';
import sentry from 'proton-shared/lib/helpers/sentry';
import * as config from './config';
import PrivateApp from './PrivateApp... | import React from 'react';
import { ProtonApp, useAuthentication, PublicAuthenticationStore, PrivateAuthenticationStore } from 'react-components';
import sentry from 'proton-shared/lib/helpers/sentry';
import * as config from './config';
import PrivateApp from './PrivateApp';
import PublicApp from './PublicApp';
impo... | Use fast-refresh instead of hot-loader | Use fast-refresh instead of hot-loader
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,4 +1,3 @@
-import { hot } from 'react-hot-loader/root';
import React from 'react';
import { ProtonApp, useAuthentication, PublicAuthenticationStore, PrivateAuthenticationStore } from 'react-components';
import sentry from 'proton-shared/lib/helpers/sentry';
@@ -27,4 +26,4 @@
);
};
-export def... |
f7d91081831e85de1b93a4e8ce3da443a62924c9 | src/list.ts | src/list.ts | export function shuffle<T>(xs: T[]): T[] {
'use strict';
let n = xs.length;
while (n) {
const i = Math.floor(Math.random() * n--);
const t = xs[n];
xs[n] = xs[i];
xs[i] = t;
}
return xs;
}
export function sum(xs: number[]): number {
'use strict';
let result = 0;
for (let i = 0, len = xs.length; i < len... | import Task from './task';
export function shuffle<T>(xs: T[]): Task<T[]> {
'use strict';
let n = xs.length;
while (n) {
const i = Math.floor(Math.random() * n--);
const t = xs[n];
xs[n] = xs[i];
xs[i] = t;
}
return Task.resolve(xs);
}
export function sum(xs: number[]): number {
'use strict';
let resul... | Clarify that List.shuffle has a side effect | Clarify that List.shuffle has a side effect
| TypeScript | mit | AyaMorisawa/node-powerful | ---
+++
@@ -1,4 +1,6 @@
-export function shuffle<T>(xs: T[]): T[] {
+import Task from './task';
+
+export function shuffle<T>(xs: T[]): Task<T[]> {
'use strict';
let n = xs.length;
while (n) {
@@ -7,7 +9,7 @@
xs[n] = xs[i];
xs[i] = t;
}
- return xs;
+ return Task.resolve(xs);
}
export function sum(x... |
2f5c54ee206d06e607074413fed8c5db2ead0937 | src/app/app.routes.ts | src/app/app.routes.ts | import { Routes, RouterModule } from '@angular/router';
import { Home } from './home';
import { About } from './about';
import { NoContent } from './no-content';
import { RacersComponent } from './racers';
import { TeamsComponent } from './teams';
import { DashboardComponent } from './dashboard';
import { DataResolve... | import { Routes, RouterModule } from '@angular/router';
import { Home } from './home';
import { About } from './about';
import { NoContent } from './no-content';
import { RacersComponent } from './racers';
import { TeamsComponent } from './teams';
import { DashboardComponent } from './dashboard';
import { RacerDetailC... | Add racer and team detail components to router | Add racer and team detail components to router
| TypeScript | mit | MarkProvanP/racetrack,MarkProvanP/racetrack,MarkProvanP/racetrack,MarkProvanP/racetrack | ---
+++
@@ -6,6 +6,8 @@
import { RacersComponent } from './racers';
import { TeamsComponent } from './teams';
import { DashboardComponent } from './dashboard';
+import { RacerDetailComponent } from './racer-detail';
+import { TeamDetailComponent } from './team-detail';
import { DataResolver } from './app.resolv... |
742b2725245158bd5d9051ed00f6afcb593c5b7d | packages/chatbox/src/index.ts | packages/chatbox/src/index.ts | // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
export * from './panel';
export * from './chatbox';
export * from './entry'
| // Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
import '../style/index.css';
export * from './panel';
export * from './chatbox';
export * from './entry'
| Update theme loading for chatbox. | Update theme loading for chatbox.
| TypeScript | bsd-3-clause | jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab,jupyter/jupyterlab | ---
+++
@@ -1,5 +1,7 @@
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License.
+
+import '../style/index.css';
export * from './panel';
export * from './chatbox'; |
5818c7c3290cce5d138441e29500f6c535c0bf14 | src/app/item-dialog-modal/item-dialog-modal.component.ts | src/app/item-dialog-modal/item-dialog-modal.component.ts | import { Component, OnInit, Input } from '@angular/core';
import { Mage } from '../model/mage.model';
import { EquipmentVault } from '../model/equipmentvault.model';
import { Equipment } from '../model/equipment.model';
@Component({
selector: 'app-item-dialog-modal',
templateUrl: './item-dialog-modal.component.ht... | import { Component, OnInit, Input } from '@angular/core';
import { Mage } from '../model/mage.model';
import { EquipmentVault } from '../model/equipmentVault.model';
import { Equipment } from '../model/equipment.model';
@Component({
selector: 'app-item-dialog-modal',
templateUrl: './item-dialog-modal.component.ht... | Fix for casing issue throwing a warning | Fix for casing issue throwing a warning
Fix for casing issue throwing a warning. file declarations need to match
file letter casing.
| TypeScript | mit | ChargerIIC/Frostgrave-WarRoster,ChargerIIC/Frostgrave-WarRoster,ChargerIIC/Frostgrave-WarRoster | ---
+++
@@ -1,7 +1,7 @@
import { Component, OnInit, Input } from '@angular/core';
import { Mage } from '../model/mage.model';
-import { EquipmentVault } from '../model/equipmentvault.model';
+import { EquipmentVault } from '../model/equipmentVault.model';
import { Equipment } from '../model/equipment.model';
... |
3ef95e663fa12b2ceeed76e55367fcc03daec4bf | electron/src/storage/repository-healer.ts | electron/src/storage/repository-healer.ts | import * as fs from "fs-extra";
import {LocalRepository} from "./types/local-repository";
export function heal(repository: LocalRepository, key?: keyof LocalRepository): Promise<boolean> {
const fixes = [] as Promise<any>[];
let modified = false;
return new Promise((resolve, reject) => {
if (key... | import * as fs from "fs-extra";
import {LocalRepository} from "./types/local-repository";
import {defaultExecutionOutputDirectory} from "../controllers/execution-results.controller";
export function heal(repository: LocalRepository, key?: keyof LocalRepository): Promise<boolean> {
const fixes = [] as Promise<any>... | Set default executor outDir if none exists | fix(executor-config): Set default executor outDir if none exists
| TypeScript | apache-2.0 | rabix/composer,rabix/cottontail-frontend,rabix/cottontail-frontend,rabix/cottontail-frontend,rabix/composer,rabix/cottontail-frontend,rabix/composer | ---
+++
@@ -1,5 +1,6 @@
import * as fs from "fs-extra";
import {LocalRepository} from "./types/local-repository";
+import {defaultExecutionOutputDirectory} from "../controllers/execution-results.controller";
export function heal(repository: LocalRepository, key?: keyof LocalRepository): Promise<boolean> {
@@ -... |
c42e16edaaaa032ab64ef08ea3765dda2b19392f | src/templates/customTemplate.ts | src/templates/customTemplate.ts | import * as ts from 'typescript'
import { BaseTemplate } from './baseTemplates'
import { CompletionItemBuilder } from '../completionItemBuilder'
export class CustomTemplate extends BaseTemplate {
private conditionsMap = new Map<string, (node: ts.Node) => boolean>([
['identifier', (node: ts.Node) => this.is... | import * as ts from 'typescript'
import { BaseTemplate } from './baseTemplates'
import { CompletionItemBuilder } from '../completionItemBuilder'
export class CustomTemplate extends BaseTemplate {
private conditionsMap = new Map<string, (node: ts.Node) => boolean>([
['identifier', (node: ts.Node) => this.is... | Rename CustomTemplate to use `when` instead of `condition` | Rename CustomTemplate to use `when` instead of `condition`
It maps to what's in the configuration better and should be less confusing.
Actually got confused myself after longer break.
| TypeScript | mit | ipatalas/vscode-postfix-ts,ipatalas/vscode-postfix-ts | ---
+++
@@ -12,7 +12,7 @@
['function-call', (node: ts.Node) => this.isCallExpression(node)]
])
- constructor (private name: string, private description: string, private body: string, private conditions: string[]) {
+ constructor (private name: string, private description: string, private body: string, pri... |
4839dd275adecbc8688151a5b0a17aa455fcfa39 | src/explorer.ts | src/explorer.ts | import react = require("react");
import Explorer = require("./components/explorer");
/**
* Creates and renders the API Explorer component.
*/
export function run(): void {
react.render(Explorer.create(), document.getElementById("container"));
}
| import react = require("react");
import Explorer = require("./components/explorer");
/**
* Creates and renders the API Explorer component.
*/
export function run(initial_resource?: string, initial_route?: string): void {
react.render(Explorer.create({
initial_resource_string: initial_resource,
initial_rou... | Add optional parameter to specify resource/route | Add optional parameter to specify resource/route
The actual react compoent already had these via an optional Prop, so
we only need to pass it in in the initial `run()` function. Just
pass the string you want to add in and it will adjust the choices.
For example, `AsanaTester.Explorer.run("Projects", "/teams/%d/project... | TypeScript | mit | Asana/api-explorer,Asana/api-explorer | ---
+++
@@ -5,6 +5,9 @@
/**
* Creates and renders the API Explorer component.
*/
-export function run(): void {
- react.render(Explorer.create(), document.getElementById("container"));
+export function run(initial_resource?: string, initial_route?: string): void {
+ react.render(Explorer.create({
+ initial_... |
bc9e3e31b0cf1fe3c8387c4e5b555ff3900b98f0 | applications/vpn-settings/src/app/containers/GeneralContainer.tsx | applications/vpn-settings/src/app/containers/GeneralContainer.tsx | import React from 'react';
import { c } from 'ttag';
import { LanguageSection, ThemesSection, SettingsPropsShared } from 'react-components';
import locales from 'proton-shared/lib/i18n/locales';
import PrivateMainSettingsAreaWithPermissions from '../components/page/PrivateMainSettingsAreaWithPermissions';
export cons... | import React from 'react';
import { c } from 'ttag';
import { LanguageSection, ThemesSection, SettingsPropsShared, EarlyAccessSection } from 'react-components';
import locales from 'proton-shared/lib/i18n/locales';
import PrivateMainSettingsAreaWithPermissions from '../components/page/PrivateMainSettingsAreaWithPermis... | Add early access to general settings | Add early access to general settings
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -1,6 +1,6 @@
import React from 'react';
import { c } from 'ttag';
-import { LanguageSection, ThemesSection, SettingsPropsShared } from 'react-components';
+import { LanguageSection, ThemesSection, SettingsPropsShared, EarlyAccessSection } from 'react-components';
import locales from 'proton-shared/lib/i... |
46df75d002cb7342423ec3fd5ce545db36ccf39c | test/runTest.ts | test/runTest.ts | import {
downloadAndUnzipVSCode,
resolveCliPathFromVSCodeExecutablePath,
runTests,
} from "@vscode/test-electron";
import * as cp from "child_process";
import * as path from "path";
async function main() {
try {
const extensionDevelopmentPath = path.resolve(__dirname, "..", "..");
const exten... | import {
downloadAndUnzipVSCode,
resolveCliArgsFromVSCodeExecutablePath,
runTests,
} from "@vscode/test-electron";
import * as cp from "child_process";
import * as path from "path";
async function main() {
try {
const extensionDevelopmentPath = path.resolve(__dirname, "..", "..");
const exten... | Fix live preview install for tests | Fix live preview install for tests
| TypeScript | mit | ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters,ryanluker/vscode-coverage-gutters | ---
+++
@@ -1,6 +1,6 @@
import {
downloadAndUnzipVSCode,
- resolveCliPathFromVSCodeExecutablePath,
+ resolveCliArgsFromVSCodeExecutablePath,
runTests,
} from "@vscode/test-electron";
import * as cp from "child_process";
@@ -11,10 +11,10 @@
const extensionDevelopmentPath = path.resolve(__dirname, "... |
97f2d9e79d97a11a50c6b7a42fbd0b8abd826c73 | tests/_utils.ts | tests/_utils.ts | /// <reference path="./../typings/index.d.ts" />
const config: {[prop: string]: string} = process.env;
// Grab secret keys
const apiKey = config["gearworks-apiKey"] || config["apiKey"] ;
const secretKey = config["gearworks-secretKey"] || config["secretKey"];
const shopDomain = config["gearworks-shopDomain"] ... | /// <reference path="./../typings/index.d.ts" />
const config: {[prop: string]: string} = process.env;
// Grab secret keys
const apiKey = config["shopify-prime-apiKey"] || config["apiKey"] ;
const secretKey = config["shopify-prime-secretKey"] || config["secretKey"];
const shopDomain = config["shopify-prime-s... | Change test environment variable names | Change test environment variable names
| TypeScript | mit | nozzlegear/Shopify-Prime | ---
+++
@@ -3,10 +3,10 @@
const config: {[prop: string]: string} = process.env;
// Grab secret keys
-const apiKey = config["gearworks-apiKey"] || config["apiKey"] ;
-const secretKey = config["gearworks-secretKey"] || config["secretKey"];
-const shopDomain = config["gearworks-shopDomain"] || config["shopD... |
3bf1feb090378c2ed96f7c5317ca9e11a7078224 | src/shared/components/ContextMenu/Separator/index.tsx | src/shared/components/ContextMenu/Separator/index.tsx | import * as React from 'react';
import { StyledSeparator } from './styles';
export interface IProps {
i?: number;
visible?: boolean;
menuVisible: boolean;
}
export default class MenuSeparator extends React.Component<IProps, {}> {
private timeout: any;
public static defaultProps = {
visible: true,
};... | import * as React from 'react';
import { StyledSeparator } from './styles';
export interface IProps {
i?: number;
visible?: boolean;
menuVisible?: boolean;
}
export default class MenuSeparator extends React.Component<IProps, {}> {
private timeout: any;
public static defaultProps = {
visible: true,
}... | Fix error with context menu separator | Fix error with context menu separator
| TypeScript | apache-2.0 | Nersent/Wexond,Nersent/Wexond | ---
+++
@@ -5,7 +5,7 @@
export interface IProps {
i?: number;
visible?: boolean;
- menuVisible: boolean;
+ menuVisible?: boolean;
}
export default class MenuSeparator extends React.Component<IProps, {}> { |
4cf6e3423db960cb14fcc3a720a6b4d522f37355 | config/runtimeExamples/configLoader.ts | config/runtimeExamples/configLoader.ts | import { IConfig } from "@cfg/index.d";
export const loadConfig = (url: string): Promise<IConfig<any>> =>
new Promise((resolve, reject) => {
fetch(url)
.then(res => res.json())
.then(parsedConfig => {
resolve(parsedConfig);
})
.catch(reject);
});
| import { IConfig } from "@cfg/index.d";
export const loadConfig = (url: string): Promise<IConfig<any>> =>
new Promise((resolve, reject) => {
fetch(url)
.then(res => res.json())
.catch(reject)
.then(parsedConfig => {
resolve(parsedConfig);
});
});
| Fix runtime config loader example promise rejection being called too late | Fix runtime config loader example promise rejection being called too late
| TypeScript | mit | gyng/jsapp-boilerplate,gyng/jsapp-boilerplate,gyng/jsapp-boilerplate,gyng/jsapp-boilerplate | ---
+++
@@ -4,8 +4,8 @@
new Promise((resolve, reject) => {
fetch(url)
.then(res => res.json())
+ .catch(reject)
.then(parsedConfig => {
resolve(parsedConfig);
- })
- .catch(reject);
+ });
}); |
b4d591ca7e6364a4951bdc44e4365b7e28d7b60c | src/elements/import-exports/import-named.ts | src/elements/import-exports/import-named.ts | import {emit_elements} from '../../helpers/emit-elements';
import {Stack} from '../../stack';
import {ImportExport} from '../import-export';
import {ImportMember} from '../members/import-member';
export interface IImportNamedRequiredParameters {
members: ImportMember[];
from: string;
}
// tslint:disable-next-line... | import {emit_elements} from '../../helpers/emit-elements';
import {Stack} from '../../stack';
import {ImportExport} from '../import-export';
import {ImportMember} from '../members/import-member';
export interface IImportNamedRequiredParameters {
from: string;
}
export interface IImportNamedOptionalParameters {
me... | Update ImportNamd members should be an optional parameter | Update ImportNamd
members should be an optional parameter
| TypeScript | mit | ikatyang/dts-element,ikatyang/dts-element | ---
+++
@@ -4,19 +4,21 @@
import {ImportMember} from '../members/import-member';
export interface IImportNamedRequiredParameters {
- members: ImportMember[];
from: string;
}
-// tslint:disable-next-line no-empty-interface
-export interface IImportNamedOptionalParameters {}
+export interface IImportNamedOpt... |
53530f59565dda0e74f6b64971c7a8b6839a5f76 | tests/test-components/CommitBox.spec.tsx | tests/test-components/CommitBox.spec.tsx | import 'jest';
import { CommitBox } from '../../src/components/CommitBox';
import { classes } from 'typestyle';
import {
stagedCommitButtonStyle,
stagedCommitButtonReadyStyle,
stagedCommitButtonDisabledStyle
} from '../../src/style/BranchHeaderStyle';
describe('CommitBox', () => {
describe('#checkReadyForSubmi... | import * as React from 'react';
import 'jest';
import { shallow } from 'enzyme';
import { CommitBox } from '../../src/components/CommitBox';
describe('CommitBox', () => {
describe('#constructor()', () => {
it('should return a new instance', () => {
const box = new CommitBox({
onCommit: async () => ... | Add initial commit box tests | Add initial commit box tests
| TypeScript | bsd-3-clause | jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git,jupyterlab/jupyterlab-git | ---
+++
@@ -1,57 +1,47 @@
+import * as React from 'react';
import 'jest';
+import { shallow } from 'enzyme';
import { CommitBox } from '../../src/components/CommitBox';
-import { classes } from 'typestyle';
-import {
- stagedCommitButtonStyle,
- stagedCommitButtonReadyStyle,
- stagedCommitButtonDisabledStyle
-} ... |
2359ad4ad507406dff042a878632e20e6e9f02d6 | packages/components/containers/members/DeleteMemberModal.tsx | packages/components/containers/members/DeleteMemberModal.tsx | import React, { useState } from 'react';
import { c } from 'ttag';
import { Member } from 'proton-shared/lib/interfaces/Member';
import { Alert, Input, ErrorButton, DeleteModal } from '../../components';
interface Props {
member: Member;
onConfirm: () => void;
onClose: () => void;
}
const DeleteMemberMod... | import React, { useState } from 'react';
import { c } from 'ttag';
import { Member } from 'proton-shared/lib/interfaces/Member';
import { Alert, Input, ErrorButton, DeleteModal, Card } from '../../components';
interface Props {
member: Member;
onConfirm: () => void;
onClose: () => void;
}
const DeleteMem... | Rework delete-user modal a bit | Rework delete-user modal a bit
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -2,7 +2,7 @@
import { c } from 'ttag';
import { Member } from 'proton-shared/lib/interfaces/Member';
-import { Alert, Input, ErrorButton, DeleteModal } from '../../components';
+import { Alert, Input, ErrorButton, DeleteModal, Card } from '../../components';
interface Props {
member: Member;
@@... |
a3f4c8a843d4e66218b489865eaea656e71a3a0b | functions/add-item.ts | functions/add-item.ts | import { Request, Response } from "express";
import * as admin from "firebase-admin";
import * as msgpack from "msgpack-lite";
import nanoid = require("nanoid");
import { parse } from "url";
import { convertUrlIntoArticle } from "./article";
import { httpsFunction } from "./utils";
import { convertUrlIntoVideo } from ... | import { Request, Response } from "express";
import * as admin from "firebase-admin";
import * as msgpack from "msgpack-lite";
import nanoid = require("nanoid");
import { parse } from "url";
import { convertUrlIntoArticle } from "./article";
import { httpsFunction } from "./utils";
import { convertUrlIntoVideo } from ... | Handle errors when an articles file is missing | Handle errors when an articles file is missing
| TypeScript | mit | raviqqe/code2d,raviqqe/code2d,raviqqe/code2d,raviqqe/code2d | ---
+++
@@ -29,7 +29,15 @@
console.log("Item:", item);
const file = new File(`/users/${userId}/${isVideo ? "videos" : "articles"}/todo`);
- await file.write([{ id: nanoid(), ...item }, ...(await file.read())]);
+ let items = [];
+
+ try {
+ items = await file.read()... |
a806472a28d2e0d954abd75dc2c4f750bcd50a8a | src/main/ts/ephox/boss/api/Main.ts | src/main/ts/ephox/boss/api/Main.ts | import BasicPage from './BasicPage';
import CommentGene from './CommentGene';
import DomUniverse from './DomUniverse';
import Gene from './Gene';
import TestUniverse from './TestUniverse';
import TextGene from './TextGene';
// NON API USAGE
// used by phoenix
import Logger from '../mutant/Logger';
// used by soldier t... | import BasicPage from './BasicPage';
import CommentGene from './CommentGene';
import DomUniverse from './DomUniverse';
import Gene from './Gene';
import TestUniverse from './TestUniverse';
import TextGene from './TextGene';
// NON API USAGE
// used by soldier tests
import Locator from '../mutant/Locator';
export {
... | Remove Logger from boss API (which overlaps with agar Logger). The phoenix use has been resolved. | TBIO-5141: Remove Logger from boss API (which overlaps with agar Logger). The phoenix use has been resolved.
| TypeScript | lgpl-2.1 | TeamupCom/tinymce,FernCreek/tinymce,FernCreek/tinymce,tinymce/tinymce,tinymce/tinymce,tinymce/tinymce,FernCreek/tinymce,TeamupCom/tinymce | ---
+++
@@ -6,8 +6,6 @@
import TextGene from './TextGene';
// NON API USAGE
-// used by phoenix
-import Logger from '../mutant/Logger';
// used by soldier tests
import Locator from '../mutant/Locator';
@@ -18,6 +16,5 @@
Gene,
TestUniverse,
TextGene,
- Logger,
Locator
}; |
3d925d72f8113a14c8a7e86db60825b937e2a944 | server/src/routes/front.ts | server/src/routes/front.ts | import { Request, Response, Router } from 'express';
import * as path from 'path';
export function front(): Router {
const r = Router();
r.get('*', (req: Request, res: Response) => {
res.sendFile(path.join(__dirname, '../public/index.html'), (err: Error) => {
if (err) {
ret... | import { Request, Response, Router } from 'express';
import * as path from 'path';
import { ErrorResponse } from '../common/responses';
export function front(): Router {
const r = Router();
r.get('*', (req: Request, res: Response) => {
if (req.accepts('html')) {
res.sendFile(path.join(__dir... | Handle Accept: application/json for all routes | Handle Accept: application/json for all routes
| TypeScript | mit | mattbdean/Helium,mattbdean/Helium,mattbdean/Helium,mattbdean/Helium | ---
+++
@@ -1,17 +1,27 @@
import { Request, Response, Router } from 'express';
import * as path from 'path';
+import { ErrorResponse } from '../common/responses';
export function front(): Router {
const r = Router();
-
r.get('*', (req: Request, res: Response) => {
- res.sendFile(path.join(__dirn... |
66f1f5426d206652e748775ff1b0dc4530004fc6 | app/src/ui/history/drag-and-drop-intro.ts | app/src/ui/history/drag-and-drop-intro.ts | /** Type of the drag and drop intro popover. Each value represents a feature. */
export enum DragAndDropIntroType {
CherryPick = 'cherry-pick',
Squash = 'squash',
Reorder = 'reorder',
}
/** Structure to describe the drag and drop intro popover. */
export type DragAndDropIntro = {
readonly title: string
reado... | /** Type of the drag and drop intro popover. Each value represents a feature. */
export enum DragAndDropIntroType {
CherryPick = 'cherry-pick',
Squash = 'squash',
Reorder = 'reorder',
}
/** Structure to describe the drag and drop intro popover. */
export type DragAndDropIntro = {
readonly title: string
reado... | Update Intro Titles with "Drag and drop to" | Update Intro Titles with "Drag and drop to"
| TypeScript | mit | desktop/desktop,say25/desktop,say25/desktop,shiftkey/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/desktop,desktop/desktop,j-f1/forked-desktop,desktop/desktop,shiftkey/desktop,shiftkey/desktop,artivilla/desktop,say25/desktop,j-f1/forked-desktop,artivilla/desktop,say25/desktop,desktop/desktop,artivilla/deskt... | ---
+++
@@ -22,17 +22,17 @@
DragAndDropIntro
> = {
[DragAndDropIntroType.CherryPick]: {
- title: 'Cherry-pick!',
+ title: 'Drag and drop to cherry-pick!',
body:
'Copy commits to another branch by dragging and dropping them onto a branch in the branch menu, or by right clicking on a commit.',
... |
65ff52fdfb8d6c424a722d6343f29fc49c255eb9 | src/messages/IPreMessageSentHandler.ts | src/messages/IPreMessageSentHandler.ts | import { IMessageExtend, IMessageRead, IRead } from '../accessors/index';
import { IRoom } from '../rooms/index';
import { IUser } from '../users/index';
import { IMessage } from './IMessage';
export interface IPreMessageSentHandler {
/**
* First step when a handler is executed: Enables the handler to signal
... | import { IMessageExtend, IRead } from '../accessors/index';
import { IMessage } from './IMessage';
export interface IPreMessageSentHandler {
/**
* First step when a handler is executed: Enables the handler to signal
* to the Rocketlets framework whether handler shall actually execute for the message
... | Read should always provide a big context | Read should always provide a big context
| TypeScript | mit | graywolf336/temporary-rocketlets-ts-definition,graywolf336/temporary-rocketlets-ts-definition | ---
+++
@@ -1,6 +1,4 @@
-import { IMessageExtend, IMessageRead, IRead } from '../accessors/index';
-import { IRoom } from '../rooms/index';
-import { IUser } from '../users/index';
+import { IMessageExtend, IRead } from '../accessors/index';
import { IMessage } from './IMessage';
export interface IPreMessageSentH... |
5ad17c059c099f0afcc5f97d5c29fc6b45c48230 | applications/drive/src/app/api/files.ts | applications/drive/src/app/api/files.ts | import { CreateDriveFile, UpdateFileRevision } from '../interfaces/file';
export const queryCreateFile = (shareId: string, data: CreateDriveFile) => {
return {
method: 'post',
url: `drive/shares/${shareId}/files`,
data
};
};
export const queryFileRevision = (shareId: string, linkId: st... | import { CreateDriveFile, UpdateFileRevision } from '../interfaces/file';
export const queryCreateFile = (shareId: string, data: CreateDriveFile) => {
return {
method: 'post',
url: `drive/shares/${shareId}/files`,
data
};
};
export const queryFileRevision = (shareId: string, linkId: st... | Remove v2 from block request | Remove v2 from block request
| TypeScript | mit | ProtonMail/WebClient,ProtonMail/WebClient,ProtonMail/WebClient | ---
+++
@@ -26,7 +26,7 @@
return {
method: 'post',
url: 'drive/blocks',
- data: { ...data, V2: true }
+ data
};
};
|
96c233d576d63aaa9669e52c05115ab6f4d7b44e | client/Settings/components/Dropdown.tsx | client/Settings/components/Dropdown.tsx | import { Field } from "formik";
import React = require("react");
export const Dropdown = (props: {
fieldName: string;
options: {};
children: any;
}) => (
<div className="c-dropdown">
<span>{props.children}</span>
<SelectOptions {...props} />
</div>
);
const SelectOptions = (props: { fieldName: strin... | import { Field } from "formik";
import * as _ from "lodash";
import React = require("react");
export const Dropdown = (props: {
fieldName: string;
options: {};
children: any;
}) => (
<div className="c-dropdown">
<span>{props.children}</span>
<SelectOptions {...props} />
</div>
);
const SelectOptions... | Use enum values instead of keys | Use enum values instead of keys
| TypeScript | mit | cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative,cynicaloptimist/improved-initiative | ---
+++
@@ -1,4 +1,5 @@
import { Field } from "formik";
+import * as _ from "lodash";
import React = require("react");
export const Dropdown = (props: {
@@ -14,9 +15,9 @@
const SelectOptions = (props: { fieldName: string; options: {} }) => (
<Field component="select" name={props.fieldName}>
- {Object.ke... |
98e6c2cd3c73ce7fb5661b691883428fc2ccfc39 | src/route_factories/presenter_route/pageable_data_layout_presenter.ts | src/route_factories/presenter_route/pageable_data_layout_presenter.ts | import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string | null;
after?: string | null;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tsli... | import { Presenter } from "./presenter";
export interface PagingEntity {
before?: string;
after?: string;
}
export interface PaginatedInput<DataInput> {
data: DataInput;
paging: PagingEntity;
}
export interface PaginatedOutput<DataOutput> {
data: DataOutput;
paging: PagingEntity;
}
// tslint:disable-nex... | Revert "Update PagingEntity on PageableDataLayoutPresenter" | Revert "Update PagingEntity on PageableDataLayoutPresenter"
This reverts commit cddc1a357b525cb47253d238ac764e6b092cc578.
| TypeScript | mit | balmbees/corgi | ---
+++
@@ -1,8 +1,8 @@
import { Presenter } from "./presenter";
export interface PagingEntity {
- before?: string | null;
- after?: string | null;
+ before?: string;
+ after?: string;
}
export interface PaginatedInput<DataInput> {
@@ -26,11 +26,9 @@
properties: {
before: {
... |
29771cbecc3ef6043e29c4a64a92746e0052c35f | backend/src/server.ts | backend/src/server.ts | import {NestFactory} from '@nestjs/core';
import {SwaggerModule, DocumentBuilder} from '@nestjs/swagger';
import {ValidationPipe, INestApplication} from '@nestjs/common';
import * as bodyParser from 'body-parser';
import * as cors from 'cors';
import {AppModule} from './app.module';
import {AuthGuard} from './auth/aut... | import {NestFactory} from '@nestjs/core';
import {SwaggerModule, DocumentBuilder} from '@nestjs/swagger';
import {ValidationPipe, INestApplication} from '@nestjs/common';
import * as bodyParser from 'body-parser';
import * as cors from 'cors';
import {AppModule} from './app.module';
import {AuthGuard} from './auth/aut... | Remove swagger base path - fix curl bug | Remove swagger base path - fix curl bug
| TypeScript | mit | tsmean/tsmean,tsmean/tsmean,tsmean/tsmean,tsmean/tsmean | ---
+++
@@ -24,7 +24,6 @@
const swaggerConfig = new DocumentBuilder()
.addBearerAuth()
.setTitle('tsmean sample api')
- .setBasePath(apiPath(1, ''))
.addTag('Animals')
.addTag('Animal lists')
.addTag('Users') |
46b935bce68581f5e648c020d75bb374a3b07b87 | leveldata.ts | leveldata.ts | var levels = {
"Entryway": {
"map": [ "####E###",
"#......#",
"#.@....#",
"#......#",
"#......E",
"#.#..#.#",
"#......#",
"########"],
"n_to": "Kitchen",
"e_to": "Vehicle maintenance",
},
"Kitchen": {
"map": [ "########",
"#.c.c..#",
"#...@..#",
"#......#",
"#......#",
... | var levels = {
"Entryway": {
"map": [ "####EE######",
"#..........#",
"#..........#",
"#..........#",
"#..........#",
"#..........#",
"#.@........#",
"#..........E",
"#..........E",
"#.#..#.....#",
"#..........#",
"############"],
"n_to": "Kitchen",
"e_to": "Vehicle maintenance",... | Convert levels to 12x12 layout | Convert levels to 12x12 layout
| TypeScript | mit | jmacarthur/ld37,jmacarthur/ld37 | ---
+++
@@ -1,48 +1,64 @@
var levels = {
"Entryway": {
- "map": [ "####E###",
- "#......#",
- "#.@....#",
- "#......#",
- "#......E",
- "#.#..#.#",
- "#......#",
- "########"],
+ "map": [ "####EE######",
+ "#..........#",
+ "#..........#",
+ "#..........#",
+ "#..........#",
+ "#........... |
ce92a0aa82af24077f5b07fbdb8fa45f55918cb6 | polygerrit-ui/app/api/core.ts | polygerrit-ui/app/api/core.ts | /**
* @fileoverview Core API types for Gerrit.
*
* Core types are types used in many places in Gerrit, such as the Side enum.
*
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance wi... | /**
* @fileoverview Core API types for Gerrit.
*
* Core types are types used in many places in Gerrit, such as the Side enum.
*
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance wi... | Add some more docs about the range type | Add some more docs about the range type
Change-Id: I0586d9b71a4581ef56b902668c1020374020a195
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -22,10 +22,26 @@
/**
* The CommentRange entity describes the range of an inline comment.
* https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#comment-range
+ *
+ * The range includes all characters from the start position, specified by
+ * start_line and start_character, to the... |
577ca4a636e10fcba64e7e0cee6a546c0676ceda | polygerrit-ui/app/services/flags/flags.ts | polygerrit-ui/app/services/flags/flags.ts | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | /**
* @license
* Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... | Remove new reply dialog experiment from KnownExperimentId | Remove new reply dialog experiment from KnownExperimentId
Finish cleanup partially completed in Change 314493.
Change-Id: I6af29c343f2832d198b4c2520a1a1be58ef8e64b
| TypeScript | apache-2.0 | GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit | ---
+++
@@ -27,6 +27,5 @@
NEW_IMAGE_DIFF_UI = 'UiFeature__new_image_diff_ui',
TOKEN_HIGHLIGHTING = 'UiFeature__token_highlighting',
CHECKS_DEVELOPER = 'UiFeature__checks_developer',
- NEW_REPLY_DIALOG = 'UiFeature__new_reply_dialog',
SUBMIT_REQUIREMENTS_UI = 'UiFeature__submit_requirements_ui',
} |
4a7e1619bf746e28665f93a50f9156c1f3bd2a51 | tests/setupTestFramework.ts | tests/setupTestFramework.ts | /* eslint-env jest */
import {
NodePath as NodePathConstructor,
astNodesAreEquivalent,
ASTNode,
} from 'ast-types';
import { NodePath } from 'ast-types/lib/node-path';
import diff from 'jest-diff';
import utils from 'jest-matcher-utils';
const matchers = {
toEqualASTNode: function (received: NodePath, expecte... | /* eslint-env jest */
import {
NodePath as NodePathConstructor,
astNodesAreEquivalent,
ASTNode,
} from 'ast-types';
import { NodePath } from 'ast-types/lib/node-path';
import { diff } from 'jest-diff';
import { printExpected, printReceived } from 'jest-matcher-utils';
const matchers = {
toEqualASTNode: functi... | Fix custom matcher for new jest version | chore: Fix custom matcher for new jest version
| TypeScript | mit | reactjs/react-docgen,reactjs/react-docgen,reactjs/react-docgen | ---
+++
@@ -6,8 +6,8 @@
ASTNode,
} from 'ast-types';
import { NodePath } from 'ast-types/lib/node-path';
-import diff from 'jest-diff';
-import utils from 'jest-matcher-utils';
+import { diff } from 'jest-diff';
+import { printExpected, printReceived } from 'jest-matcher-utils';
const matchers = {
toEqualA... |
f5083e9074bc14a289c01a3e869a9635bbd3c458 | src/Cache/InMemoryCache.ts | src/Cache/InMemoryCache.ts | import { ICache } from './ICache';
export class InMemoryCache implements ICache {
private cache = {};
public set(key: string, value: any): void {
this.cache[key] = value;
}
public get(key: string): any {
return this.cache[key];
}
public getBatch(keys: string[]): any[] {
return keys.map((key: string) => ... | import { ICache } from './ICache';
export class InMemoryCache implements ICache {
private cache = {};
public set(key: string, value: any): any {
this.cache[key] = value;
return value !== null && typeof value === 'object' ? Object.assign({}, value) : value;
}
public get(key: string): any {
const value = thi... | Update in memory cache to return cloned objects | Update in memory cache to return cloned objects
| TypeScript | mit | sygic-travel/js-sdk,sygic-travel/js-sdk,sygic-travel/js-sdk | ---
+++
@@ -3,18 +3,21 @@
export class InMemoryCache implements ICache {
private cache = {};
- public set(key: string, value: any): void {
+ public set(key: string, value: any): any {
this.cache[key] = value;
+ return value !== null && typeof value === 'object' ? Object.assign({}, value) : value;
}
pub... |
d5f285e74ed5d448d7f506b8a03610bcc8af9981 | src/server/src/healthcheck/topology-loaded.indicator.ts | src/server/src/healthcheck/topology-loaded.indicator.ts | import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public ... | import { Injectable } from "@nestjs/common";
import { HealthIndicator, HealthIndicatorResult, HealthCheckError } from "@nestjs/terminus";
import { TopologyService } from "../districts/services/topology.service";
@Injectable()
export default class TopologyLoadedIndicator extends HealthIndicator {
constructor(public ... | Clean up health check output to be less verbose | Clean up health check output to be less verbose
| TypeScript | apache-2.0 | PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder,PublicMapping/DistrictBuilder | ---
+++
@@ -27,9 +27,14 @@
});
})
)) as [string, boolean][];
- const layerStatus = Object.fromEntries(layerEntries);
- const isHealthy = Object.values(layerStatus).every(status => status);
- const result = this.getStatus(key, isHealthy, layerStatus);
+
+ const isHealthy = layerEntries... |
40da9ada036a5692c9863cddd0d25e75d1430f4c | src/Config/ProxyHandlerConfig.ts | src/Config/ProxyHandlerConfig.ts | import { HandlerConfig } from './HandlerConfig';
/**
* Configuration settings for a Handler object.
*/
export interface ProxyHandlerConfig extends HandlerConfig {
/**
* Remote root path where the request will be redirected. Defaults to '/'. e.g.
*/
remotePath?: string;
/**
* Name of the ... | import { HandlerConfig } from './HandlerConfig';
/**
* Configuration settings for a Handler object.
*/
export interface ProxyHandlerConfig extends HandlerConfig {
/**
* Remote root path where the request will be redirected. Defaults to '/'. e.g.
*/
baseUrl?: string;
/**
* Name of the Pat... | Tweak the config to reflect the fact we are using the request library rather than the native node one. | Tweak the config to reflect the fact we are using the request library rather than the native node one.
| TypeScript | mit | syrp-nz/ts-lambda-handler,syrp-nz/ts-lambda-handler | ---
+++
@@ -8,7 +8,7 @@
/**
* Remote root path where the request will be redirected. Defaults to '/'. e.g.
*/
- remotePath?: string;
+ baseUrl?: string;
/**
* Name of the Path Parameter on the AWS request that contains the path of the request. This will default to `path`
@@ -24,7 +... |
0c5272ac6ad4f64f85ec49a331fd9c5d9a64ff18 | lib/index.ts | lib/index.ts | import * as auto from 'autocreate';
import * as debug from 'debug';
import { Client } from './client';
import { BasiqAPIOptions } from './interfaces';
import { Account } from './resources/accounts';
import { Connection } from './resources/connections';
import { Institution } from './resources/institutions';
import { T... | import * as debug from 'debug';
import { Client } from './client';
import { BasiqAPIOptions } from './interfaces';
import { Account } from './resources/accounts';
import { Connection } from './resources/connections';
import { Institution } from './resources/institutions';
import { Transaction } from './resources/trans... | Remove autocreate dependency and output resource types | Remove autocreate dependency and output resource types
| TypeScript | bsd-2-clause | FluentDevelopment/basiq-api | ---
+++
@@ -1,4 +1,3 @@
-import * as auto from 'autocreate';
import * as debug from 'debug';
import { Client } from './client';
@@ -17,33 +16,46 @@
institutions: Institution,
};
-const Basiq = auto(class BasiqAPI {
+class Basiq {
+
+ public accounts: Account;
+
+ public connections: Connection;
+
+ publi... |
7ac5d91a4892112fe8b041a39d3610764e32b02a | test/unittests/front_end/sdk/Issue_test.ts | test/unittests/front_end/sdk/Issue_test.ts | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const {assert} = chai;
import {Issue, AggregatedIssue} from '../../../../front_end/sdk/Issue.js';
import {StubIssue} from './StubIssue.js';
describe('Is... | // Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
const {assert} = chai;
import {Issue, AggregatedIssue} from '../../../../front_end/sdk/Issue.js';
import {StubIssue} from './StubIssue.js';
describe('Is... | Add test for de-duplication of cookies in AggregatedIssue | [issues] Add test for de-duplication of cookies in AggregatedIssue
R=f04d242e109628a27a0f75fd49a87722bcf291fd@chromium.org
Change-Id: Ia13d8ad4d0bd55ac139221db05ed00076da37b40
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2160940
Commit-Queue: Simon Zünd <38944668e9e2ca98ccd0275... | TypeScript | bsd-3-clause | ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend | ---
+++
@@ -26,4 +26,18 @@
const actualRequestIds = [...aggregatedIssue.requests()].map(r => r.requestId).sort();
assert.deepStrictEqual(actualRequestIds, ['id1', 'id2']);
});
+
+ it('deduplicates affected cookies across issues', () => {
+ const issue1 = new StubIssue([], ['cookie1']);
+ const iss... |
78fa7ce3c1bee3d040f7c193fd92b62871de8626 | src/main/ts/talks.ts | src/main/ts/talks.ts | class TalksCtrl{
constructor() {
// const favoriteButtons = document.getElementsByClassName('mxt-img--favorite');
// Array.from(favoriteButtons).forEach((favoriteButton: HTMLElement) => favoriteButton.onclick= this.favoriteToggle);
}
favoriteToggle(event) {
const img = event.srcElement;
const em... | class TalksCtrl{
constructor() {
// const favoriteButtons = document.getElementsByClassName('mxt-img--favorite');
// Array.from(favoriteButtons).forEach((favoriteButton: HTMLElement) => favoriteButton.onclick= this.favoriteToggle);
}
favoriteToggle(event) {
const img = event.srcElement;
const em... | Fix top page redirection when user updates a favorite talk | Fix top page redirection when user updates a favorite talk
| TypeScript | apache-2.0 | mix-it/mixit,mixitconf/mixit,mixitconf/mixit,mixitconf/mixit,mix-it/mixit,mixitconf/mixit,mix-it/mixit,mix-it/mixit,mix-it/mixit | ---
+++
@@ -8,7 +8,6 @@
favoriteToggle(event) {
const img = event.srcElement;
const email = <HTMLInputElement> document.getElementById('email');
- event.stopPropagation();
fetch(`/api/favorites/${email.value}/talks/${img.id.substr(9,img.id.length)}/toggle`, {method: 'post'})
.then(respon... |
0db9ed24822374fcbfc4cd1a6d93b596a6f04531 | src/demo.tsx | src/demo.tsx | import * as React from 'react'
import * as ReactDOM from 'react-dom'
import DatePicker from 'react-datepicker'
import insertCss from 'insert-css'
import { IntlProvider, addLocaleData } from 'react-intl'
import de from 'react-intl/locale-data/de'
import 'moment/locale/de-ch'
import intlMessages from './intlMessages'
imp... | import * as React from 'react'
import * as ReactDOM from 'react-dom'
import insertCss from 'insert-css'
import { IntlProvider, addLocaleData } from 'react-intl'
import de from 'react-intl/locale-data/de'
import 'moment/locale/de-ch'
import intlMessages from './intlMessages'
import { css, Locale, Day, Environment, Model... | Remove the obsolete DatePicker import | Remove the obsolete DatePicker import
| TypeScript | mit | ikr/react-period-of-stay-input,ikr/react-period-of-stay-input,ikr/react-period-of-stay-input | ---
+++
@@ -1,6 +1,5 @@
import * as React from 'react'
import * as ReactDOM from 'react-dom'
-import DatePicker from 'react-datepicker'
import insertCss from 'insert-css'
import { IntlProvider, addLocaleData } from 'react-intl'
import de from 'react-intl/locale-data/de' |
e31c9c2478929557f399b3e8b6e213305acbeb7b | app/services/users/user-service.ts | app/services/users/user-service.ts | import {Component} from 'angular2/angular2';
import {Http, HTTP_PROVIDERS, Headers, Response} from 'angular2/http';
import {AuthService} from './auth-service';
import {User} from './user';
@Component({
providers: [Http, HTTP_PROVIDERS]
})
export class UserService {
public users;
constructor(public http:Ht... | import {Component} from 'angular2/angular2';
import {Http, HTTP_PROVIDERS, Headers, Response} from 'angular2/http';
import {AuthService} from './auth-service';
import {User} from './user';
@Component({
providers: [Http, HTTP_PROVIDERS]
})
export class UserService {
public users;
constructor(public http:Ht... | Add a header to retrieve the data in json format rather than the whole html page | Add a header to retrieve the data in json format rather than the whole html page
| TypeScript | agpl-3.0 | ProjetSigma/frontend,ProjetSigma/frontend,ProjetSigma/frontend | ---
+++
@@ -15,6 +15,7 @@
getUsers() {
var headers = new Headers();
headers.append('Authorization', 'Bearer ' + this.auth.accessToken);
+ headers.append('Accept', 'application/json');
var request = this.http.get('http://localhost:8000/user/',
{headers:headers} |
81b6ca90909c72306e9640a4ce087d7fcf192806 | app/src/ui/delete-branch/index.tsx | app/src/ui/delete-branch/index.tsx | import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { Repository } from '../../models/repository'
import { Branch } from '../../models/branch'
import { Button } from '../lib/button'
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from... | import * as React from 'react'
import { Dispatcher } from '../../lib/dispatcher'
import { Repository } from '../../models/repository'
import { Branch } from '../../models/branch'
import { Button } from '../lib/button'
import { ButtonGroup } from '../lib/button-group'
import { Dialog, DialogContent, DialogFooter } from... | Use paragraphs, as the good documentation suggests | Use paragraphs, as the good documentation suggests
| TypeScript | mit | desktop/desktop,hjobrien/desktop,gengjiawen/desktop,say25/desktop,artivilla/desktop,hjobrien/desktop,shiftkey/desktop,say25/desktop,j-f1/forked-desktop,j-f1/forked-desktop,artivilla/desktop,gengjiawen/desktop,kactus-io/kactus,j-f1/forked-desktop,gengjiawen/desktop,BugTesterTest/desktops,say25/desktop,shiftkey/desktop,j... | ---
+++
@@ -24,8 +24,8 @@
onDismissed={this.props.onDismissed}
>
<DialogContent>
- <div>Delete branch "{this.props.branch.name}"?</div>
- <div>This cannot be undone.</div>
+ <p>Delete branch "{this.props.branch.name}"?</p>
+ <p>This cannot be undone.</p>
... |
09816540072664c56b4874a947c41078f2513238 | src/services/DeviceService.ts | src/services/DeviceService.ts | import winston from 'winston';
import DeviceModel from '../models/device';
export default class DeviceService {
// region public static methods
public static async addDevice(platform: string, mail: string, token: string) {
let device = await DeviceModel.findOne({ platform, mail });
if (!device) {
dev... | import winston from 'winston';
import DeviceModel from '../models/device';
export default class DeviceService {
// region public static methods
public static async addDevice(platform: string, mail: string, token: string) {
let device = await DeviceModel.findOne({ platform, mail });
if (!device) {
dev... | Use more simple way to return an empty array | Use more simple way to return an empty array
| TypeScript | mit | schulcloud/node-notification-service,schulcloud/node-notification-service,schulcloud/node-notification-service | ---
+++
@@ -28,9 +28,7 @@
public static async getDevices(platform: string, mail: string): Promise<string[]> {
const device = await DeviceModel.findOne({ platform, mail });
if (!device) {
- return new Promise<string[]>((resolve) => {
- resolve([]);
- });
+ return [];
}
re... |
5f1fe6835ddf51f4ea9155bde855e947e8063985 | src/components/BlockList/EmptyBlockList.tsx | src/components/BlockList/EmptyBlockList.tsx | import * as React from 'react';
import { connect, Dispatch } from 'react-redux';
import { changeTab } from '../../actions/updateValue';
import { Button } from '@shopify/polaris';
import { NonIdealState } from '@blueprintjs/core';
export interface Handlers {
onChangeTab: () => void;
}
// tslint:disable:jsx... | import * as React from 'react';
import { connect, Dispatch } from 'react-redux';
import { changeTab } from '../../actions/updateValue';
import { Button } from '@shopify/polaris';
import { NonIdealState } from '@blueprintjs/core';
import { TabIndex } from 'constants/enums';
export interface Handlers {
onChang... | Use TabIndex.SEARCH instead of 0. | Use TabIndex.SEARCH instead of 0.
| TypeScript | mit | Anveio/mturk-engine,Anveio/mturk-engine,Anveio/mturk-engine | ---
+++
@@ -3,6 +3,7 @@
import { changeTab } from '../../actions/updateValue';
import { Button } from '@shopify/polaris';
import { NonIdealState } from '@blueprintjs/core';
+import { TabIndex } from 'constants/enums';
export interface Handlers {
onChangeTab: () => void;
@@ -25,7 +26,7 @@
};
const mapDisp... |
d3cb7dd14cb91d379836c1e93226d1ac56942f0c | src/index.ts | src/index.ts | import LocalTimeElement from './local-time-element'
import RelativeTimeElement from './relative-time-element'
import TimeAgoElement from './time-ago-element'
import TimeUntilElement from './time-until-element'
export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement}
| import LocalTimeElement from './local-time-element.js'
import RelativeTimeElement from './relative-time-element.js'
import TimeAgoElement from './time-ago-element.js'
import TimeUntilElement from './time-until-element.js'
export {LocalTimeElement, RelativeTimeElement, TimeAgoElement, TimeUntilElement}
| Add file extensions to imports for ES Module support | Add file extensions to imports for ES Module support
| TypeScript | mit | github/time-elements,github/time-elements | ---
+++
@@ -1,6 +1,6 @@
-import LocalTimeElement from './local-time-element'
-import RelativeTimeElement from './relative-time-element'
-import TimeAgoElement from './time-ago-element'
-import TimeUntilElement from './time-until-element'
+import LocalTimeElement from './local-time-element.js'
+import RelativeTimeElem... |
2f4edc859e979dbb199d2cb1a97a3878dbfc7acf | src/index.ts | src/index.ts | import * as app from 'app';
import * as BrowserWindow from 'browser-window';
import * as Menu from 'menu';
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('ready', () => {
let mainWindow = new BrowserWindow({
width: 800,
height: 600,
title: 'Disskey',
fra... | import * as app from 'app';
import * as BrowserWindow from 'browser-window';
import * as Menu from 'menu';
if (process.platform !== 'darwin') {
app.on('window-all-closed', () => app.quit());
}
app.on('ready', () => {
let mainWindow = new BrowserWindow({
width: 800,
height: 600,
title: 'Disskey',
frame: fals... | Check if platform is not darwin before adding listener | Check if platform is not darwin before adding listener
| TypeScript | mit | AyaMorisawa/Disskey,AyaMorisawa/Disskey,AyaMorisawa/Disskey | ---
+++
@@ -2,11 +2,9 @@
import * as BrowserWindow from 'browser-window';
import * as Menu from 'menu';
-app.on('window-all-closed', () => {
- if (process.platform !== 'darwin') {
- app.quit();
- }
-});
+if (process.platform !== 'darwin') {
+ app.on('window-all-closed', () => app.quit());
+}
app.on('ready', (... |
5025b59b68d21384f5bdf7b48bd457b4fffbf94e | apprun-jsx/vdom.ts | apprun-jsx/vdom.ts | /// <reference path="../virtual-dom.d.ts" />
import h = require('virtual-dom/h');
import patch = require('virtual-dom/patch');
import diff = require('virtual-dom/diff');
import VNode = require('virtual-dom/vnode/vnode');
import VText = require('virtual-dom/vnode/vtext');
import createElement = require('virtual-dom/cre... | /// <reference path="../virtual-dom.d.ts" />
import h = require('virtual-dom/h');
import patch = require('virtual-dom/patch');
import diff = require('virtual-dom/diff');
import VNode = require('virtual-dom/vnode/vnode');
import VText = require('virtual-dom/vnode/vtext');
import createElement = require('virtual-dom/cre... | Support custom element in jsx/tsx | Support custom element in jsx/tsx
| TypeScript | mit | yysun/apprun,yysun/apprun,yysun/apprun | ---
+++
@@ -29,5 +29,7 @@
}
import app from '../app';
-app.h = (el, props, ...children) => h(el, props, children);
+app.h = (el, props, ...children) => (typeof el === 'string') ?
+ h(el, props, children) : el(props, children);
+
app.createElement = app.h; |
1675ed3cfc83e5698ac33bef1dc54f8d4ea2a227 | src/Autocompletion.ts | src/Autocompletion.ts | import {leafNodeAt, ASTNode} from "./shell/Parser";
import * as _ from "lodash";
import {Environment} from "./shell/Environment";
import {OrderedSet} from "./utils/OrderedSet";
import {Aliases} from "./shell/Aliases";
type GetSuggestionsOptions = {
currentText: string;
currentCaretPosition: number;
ast: AS... | import {leafNodeAt, ASTNode} from "./shell/Parser";
import * as _ from "lodash";
import {Environment} from "./shell/Environment";
import {OrderedSet} from "./utils/OrderedSet";
import {Aliases} from "./shell/Aliases";
type GetSuggestionsOptions = {
currentText: string;
currentCaretPosition: number;
ast: AS... | Add default icon to suggestions. | Add default icon to suggestions.
| TypeScript | mit | shockone/black-screen,shockone/black-screen,railsware/upterm,railsware/upterm,black-screen/black-screen,vshatskyi/black-screen,black-screen/black-screen,black-screen/black-screen,vshatskyi/black-screen,vshatskyi/black-screen,vshatskyi/black-screen | ---
+++
@@ -31,6 +31,9 @@
return {
isIncomplete: false,
- items: <any>uniqueSuggestions,
+ items: uniqueSuggestions.map(suggestion => ({
+ ...suggestion,
+ kind: suggestion.kind || monaco.languages.CompletionItemKind.Interface,
+ })),
};
} |
c37a604b597ee4d47c3079cf3705b36dfea5ba61 | src/dash-table/components/Table/style.ts | src/dash-table/components/Table/style.ts | import { library } from '@fortawesome/fontawesome-svg-core';
import { faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import { faEraser, faPencilAlt, faSort, faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons';
library.add(
faEraser,
faEyeSlash,
faPencilAlt,
faSort,
... | import { library } from '@fortawesome/fontawesome-svg-core';
import { faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import { faEraser, faPencilAlt, faSort, faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons';
import { faAngleLeft, faAngleRight, faAngleDoubleLeft, faAngleDoubleRight } ... | Add FA icons for previous/next/first/last page nav buttons. | Add FA icons for previous/next/first/last page nav buttons.
| TypeScript | mit | plotly/dash-table,plotly/dash-table,plotly/dash-table | ---
+++
@@ -1,6 +1,7 @@
import { library } from '@fortawesome/fontawesome-svg-core';
import { faEyeSlash, faTrashAlt } from '@fortawesome/free-regular-svg-icons';
import { faEraser, faPencilAlt, faSort, faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons';
+import { faAngleLeft, faAngleRight, faAngleDou... |
1722da329195c797eb7a5a0def682edacc582de6 | src/components/app.ts | src/components/app.ts | import Component from 'inferno-component'
import h from 'inferno-hyperscript'
interface Props {}
export default class App extends Component<Props, {}> {
render() {
return h('p', 'hello')
}
}
| import Component from 'inferno-component'
import h from 'inferno-hyperscript'
import Input from './input.ts'
interface Props {}
interface State {
titles: string[]
}
export default class App extends Component<Props, State> {
constructor(props: Props) {
super(props)
this.state = {
titles: []
}
}... | Add Input Component to App Component | Add Input Component to App Component
| TypeScript | mit | y0za/typescript-inferno-todo,y0za/typescript-inferno-todo,y0za/typescript-inferno-todo | ---
+++
@@ -1,10 +1,26 @@
import Component from 'inferno-component'
import h from 'inferno-hyperscript'
+import Input from './input.ts'
interface Props {}
+interface State {
+ titles: string[]
+}
-export default class App extends Component<Props, {}> {
+export default class App extends Component<Props, State>... |
9c4b4ff5436b533b5ab15114455ea6b752688e0d | src/index.ts | src/index.ts | export * from "./beautifier";
export * from "./languages";
export * from "./options";
import {Unibeautify} from "./beautifier";
import {Options} from "./options";
import {Languages} from "./languages";
const unibeautify = new Unibeautify();
unibeautify.loadOptions(Options);
unibeautify.loadLanguages(Languages);
export... | export * from "./beautifier";
export * from "./languages";
export * from "./options";
import {Unibeautify} from "./beautifier";
import {Options} from "./options";
import {Languages} from "./languages";
export function newUnibeautify(): Unibeautify {
const unibeautify = new Unibeautify();
unibeautify.loadOptions(O... | Add newUnibeautify method for setting up Unibeautify instance | Add newUnibeautify method for setting up Unibeautify instance
Useful for testing
| TypeScript | mit | Unibeautify/unibeautify,Unibeautify/unibeautify | ---
+++
@@ -5,7 +5,11 @@
import {Unibeautify} from "./beautifier";
import {Options} from "./options";
import {Languages} from "./languages";
-const unibeautify = new Unibeautify();
-unibeautify.loadOptions(Options);
-unibeautify.loadLanguages(Languages);
-export default unibeautify;
+
+export function newUnibeauti... |
102530b1c86e014755696cebc7888c1620933967 | ui/src/shared/constants/queryBuilder.ts | ui/src/shared/constants/queryBuilder.ts | export interface QueryFn {
name: string
flux: string
aggregate: boolean
}
export const FUNCTIONS: QueryFn[] = [
{name: 'mean', flux: `|> mean()`, aggregate: true},
{name: 'median', flux: '|> toFloat()\n |> median()', aggregate: true},
{name: 'max', flux: '|> max()', aggregate: true},
{name: 'min', flux:... | import {WINDOW_PERIOD} from 'src/shared/constants'
export interface QueryFn {
name: string
flux: string
aggregate: boolean
}
export const FUNCTIONS: QueryFn[] = [
{name: 'mean', flux: `|> mean()`, aggregate: true},
{name: 'median', flux: '|> toFloat()\n |> median()', aggregate: true},
{name: 'max', flux:... | Enable selecting derivative function in query builder | Enable selecting derivative function in query builder
| TypeScript | mit | mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,nooproblem/influxdb,li-ang/influxdb,li-ang/influxdb,in... | ---
+++
@@ -1,3 +1,5 @@
+import {WINDOW_PERIOD} from 'src/shared/constants'
+
export interface QueryFn {
name: string
flux: string
@@ -10,6 +12,11 @@
{name: 'max', flux: '|> max()', aggregate: true},
{name: 'min', flux: '|> min()', aggregate: true},
{name: 'sum', flux: '|> sum()', aggregate: true},
+ ... |
057e1cfa9d184548d660437b457ff32cc511460f | test/test.ts | test/test.ts | // Reference mocha-typescript's global definitions:
/// <reference path="../node_modules/mocha-typescript/globals.d.ts" />
import { Unit } from "../src/index";
import { assert } from "chai";
declare var console;
before("start server", () => {
// Run express?
console.log("start server");
});
after("kill serve... | // Reference mocha-typescript's global definitions:
/// <reference path="../node_modules/mocha-typescript/globals.d.ts" />
import { Unit } from "../src/index";
import { assert } from "chai";
declare var console, setTimeout;
function doWork(): Promise<void> {
return new Promise(resolve => setTimeout(resolve, 1000... | Make the global hooks async | Make the global hooks async
| TypeScript | mit | pana-cc/mocha-typescript-seed | ---
+++
@@ -4,15 +4,22 @@
import { Unit } from "../src/index";
import { assert } from "chai";
-declare var console;
+declare var console, setTimeout;
-before("start server", () => {
+function doWork(): Promise<void> {
+ return new Promise(resolve => setTimeout(resolve, 1000));
+}
+before("start server", asyn... |
f4c9ab821e423565f009f37e0bf1864929b3d5b0 | app/javascript/retrospring/features/announcement/index.ts | app/javascript/retrospring/features/announcement/index.ts | import registerEvents from 'utilities/registerEvents';
import closeAnnouncementHandler from './close';
export default (): void => {
registerEvents([
{ type: 'click', target: document.querySelector('.announcement button.close'), handler: closeAnnouncementHandler },
]);
document.querySelectorAll('.announcemen... | import registerEvents from 'utilities/registerEvents';
import closeAnnouncementHandler from './close';
export default (): void => {
registerEvents([
{ type: 'click', target: document.querySelector('.announcement button.close'), handler: closeAnnouncementHandler },
]);
document.querySelectorAll('.announcemen... | Fix incorrect localStorage key of announcement dismiss | Fix incorrect localStorage key of announcement dismiss
| TypeScript | agpl-3.0 | Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring,Retrospring/retrospring | ---
+++
@@ -7,7 +7,7 @@
]);
document.querySelectorAll('.announcement').forEach(function (el: HTMLDivElement) {
- if (!window.localStorage.getItem(el.dataset.announcementId)) {
+ if (!window.localStorage.getItem(`announcement${el.dataset.announcementId}`)) {
el.classList.remove('d-none');
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.