Instruction stringlengths 14 778 | input_code stringlengths 0 4.24k | output_code stringlengths 1 5.44k |
|---|---|---|
Fix view of notes in record activities - CR changes | {% import 'OroUIBundle::macros.html.twig' as UI %}
<div class="widget-content form-horizontal box-content row-fluid">
<div class="responsive-block">
{{ UI.renderHtmlProperty('oro.note.message.label'|trans, entity.message|raw) }}
</div>
</div>
| {% import 'OroUIBundle::macros.html.twig' as UI %}
<div class="widget-content form-horizontal box-content row-fluid">
<div class="responsive-block">
{{ UI.renderHtmlProperty('oro.note.message.label'|trans, entity.message) }}
</div>
</div>
|
Add id for html edit fields | {#=== OPTIONS ========================================================================================================#}
{% set option = {
class: field.class|default(''),
height: field.height|default(''),
label: field.label|default(''),
required: field.required|default(false),
errortext... | {#=== OPTIONS ========================================================================================================#}
{% set option = {
class: field.class|default(''),
height: field.height|default(''),
label: field.label|default(''),
required: field.required|default(false),
errortext... |
Disable the news. We want the film now! | {##
# Sidebar-Panel: Displays the latest news on Bolt
# (Usage Example: Dashboards sidebar)
#}
{% for news in context %}
{{ include('@bolt/components/panel-news-item.twig') }}
{% endfor %}
| {##
# Sidebar-Panel: Displays the latest news on Bolt
# (Usage Example: Dashboards sidebar)
#}
{% for news in context if not context.disable %}
{{ include('@bolt/components/panel-news-item.twig') }}
{% endfor %}
|
Update icon macro markup to 3.0 | {% macro icon(name, inverted) %}
<i class="icon-{{ name }}{% if inverted|default(false) %} icon-white{% endif %}"></i>
{% endmacro %}
| {% macro icon(name, inverted) %}
<span class="glyphicon glyphicon-{{ name }}"{% if inverted|default(false) %} style="color: white;"{% endif %}></span>
{% endmacro %}
|
Change transition default animation from slide to fade | /**
* Code is from https://medium.com/google-developer-experts/
* angular-supercharge-your-router-transitions-using-new-animation-features-v4-3-3eb341ede6c8
*/
import {
sequence,
trigger,
stagger,
animate,
style,
group,
query,
transition,
keyframes,
animateChild } from '@angular/animations';
exp... | /**
* Code is from https://medium.com/google-developer-experts/
* angular-supercharge-your-router-transitions-using-new-animation-features-v4-3-3eb341ede6c8
*/
import {
sequence,
trigger,
stagger,
animate,
style,
group,
query,
transition,
keyframes,
animateChild } from '@angular/animations';
exp... |
Change order of imports in header class for better logical ordering. | import { Component, EventEmitter, Output, ViewEncapsulation } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HeaderComponent {
@Output() navToggled = new EventEmi... | import { Component, ViewEncapsulation, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class HeaderComponent {
@Output() navToggled = new EventEmi... |
Fix sniffed language reducer (need object rest spread real bad..) |
import os from "../util/os";
import {app} from "../electron";
import {handleActions} from "redux-actions";
import {
IAction,
ILanguageSniffedPayload,
IFreeSpaceUpdatedPayload,
} from "../constants/action-types";
import {ISystemState} from "../types";
const initialState = {
appVersion: app.getVersion(),
os... |
import os from "../util/os";
import {app} from "../electron";
import {handleActions} from "redux-actions";
import {
IAction,
ILanguageSniffedPayload,
IFreeSpaceUpdatedPayload,
} from "../constants/action-types";
import {ISystemState} from "../types";
const initialState = {
appVersion: app.getVersion(),
os... |
Add Loader IO route verification | import { Controller, Get } from 'routing-controllers';
@Controller()
export default class IndexController {
@Get('/health')
public health() {
return { status: 'OK' };
}
}
| import { Controller, Get } from 'routing-controllers';
@Controller()
export default class IndexController {
@Get('/health')
public health() {
return { status: 'OK' };
}
// Loader.io only
@Get('/loaderio-deb75e3581d893735fd6e5050757bdb2')
public loaderio() {
return true;
}
}
|
Update guard since create-merchant flow has persistence now | import Route from '@ember/routing/route';
import '../../css/card-pay/balances.css';
import * as short from 'short-uuid';
export default class CardPayTabBaseRoute extends Route {
queryParams = {
flow: {
refreshModel: true,
},
workflowPersistenceId: {
refreshModel: true,
},
};
model(par... | import Route from '@ember/routing/route';
import '../../css/card-pay/balances.css';
import * as short from 'short-uuid';
export default class CardPayTabBaseRoute extends Route {
queryParams = {
flow: {
refreshModel: true,
},
workflowPersistenceId: {
refreshModel: true,
},
};
model(par... |
Add explicit return types, planning for a lint to enforce this later | import { buildCapabilities } from '../util/capabilities';
import type { CapturedArguments as Arguments, HelperCapabilities } from '@glimmer/interfaces';
type FnArgs<Args extends Arguments = Arguments> =
| [...Args['positional'], Args['named']]
| [...Args['positional']];
type AnyFunction = (...args: any[]) => unk... | import { buildCapabilities } from '../util/capabilities';
import type {
CapturedArguments as Arguments,
HelperCapabilities,
HelperManagerWithValue,
} from '@glimmer/interfaces';
type FnArgs<Args extends Arguments = Arguments> =
| [...Args['positional'], Args['named']]
| [...Args['positional']];
type AnyFun... |
Use an actual SpellLibrary in test StatBlockTextEnricher | import { PromptQueue } from "../Commands/Prompts/PromptQueue";
import { Encounter } from "../Encounter/Encounter";
import { DefaultRules, IRules } from "../Rules/Rules";
import { StatBlockTextEnricher } from "../StatBlock/StatBlockTextEnricher";
export function buildStatBlockTextEnricher(rules: IRules) {
return ne... | import { PromptQueue } from "../Commands/Prompts/PromptQueue";
import { Encounter } from "../Encounter/Encounter";
import { SpellLibrary } from "../Library/SpellLibrary";
import { DefaultRules, IRules } from "../Rules/Rules";
import { StatBlockTextEnricher } from "../StatBlock/StatBlockTextEnricher";
export function b... |
Update `HorizonalRule` to be hairline height | import { Fragment } from "react"
const HorizontalRule = () => (
<Fragment>
<hr></hr>
<style jsx>{`
hr {
margin: 8px 0;
height: 1px;
border: 0;
background-image: linear-gradient(
to left,
rgba(84, 84, 88, 0.35),
rgba(84, 84, 88, 1),
... | import { Fragment } from "react"
const HorizontalRule = () => (
<Fragment>
<hr></hr>
<style jsx>{`
hr {
margin: 8px 0;
height: 1px;
border: 0;
background-image: linear-gradient(
to left,
rgba(84, 84, 88, 0.35),
rgba(84, 84, 88, 1),
... |
Resolve missing hammerjs for materialize. | import 'materialize-css';
import 'angular2-materialize';
import { AnimationBuilder } from 'css-animator/builder';
AnimationBuilder.defaults.fixed = true;
| import * as Hammer from 'hammerjs';
(window as any).Hammer = Hammer;
import { AnimationBuilder } from 'css-animator/builder';
import 'materialize-css';
import 'angular2-materialize';
AnimationBuilder.defaults.fixed = true;
|
Add export for digest availability checking function | import * as encryption from './encryption';
export const hashPassword = encryption.hashPassword;
export const comparePasswordWithHash = encryption.comparePasswordWithHash;
module.exports = encryption;
| import * as encryption from './encryption';
export const isValidDigestAlgorithm = encryption.isValidDigestAlgorithm;
export const hashPassword = encryption.hashPassword;
export const comparePasswordWithHash = encryption.comparePasswordWithHash;
module.exports = encryption;
|
Use `import = require` syntax. | import * as CleanWebpackPlugin from 'clean-webpack-plugin';
const paths = [
'path',
'glob/**/*.js',
];
new CleanWebpackPlugin(paths);
new CleanWebpackPlugin(paths, 'root-directory');
new CleanWebpackPlugin(paths, {});
new CleanWebpackPlugin(paths, {
root: 'root-directory',
verbose: true,
dry: true,
watch: true,... | import CleanWebpackPlugin = require('clean-webpack-plugin');
const paths = [
'path',
'glob/**/*.js',
];
new CleanWebpackPlugin(paths);
new CleanWebpackPlugin(paths, 'root-directory');
new CleanWebpackPlugin(paths, {});
new CleanWebpackPlugin(paths, {
root: 'root-directory',
verbose: true,
dry: true,
watch: true... |
Fix some mistake on PR. | import { add } from '../../../_modules/i18n';
import nl from './nl';
import fa from './fa';
import de from './de';
import ru from './ru';
import pt_br from './pt_br';
export default function() {
add(nl, 'nl');
add(fa, 'fa');
add(de, 'de');
add(pt_br, 'pt_br');
}
| import { add } from '../../../_modules/i18n';
import nl from './nl';
import fa from './fa';
import de from './de';
import ru from './ru';
import pt_br from './pt_br';
export default function() {
add(nl, 'nl');
add(fa, 'fa');
add(de, 'de');
add(ru, 'ru');
add(pt_br, 'pt_br');
}
|
Update tests because of linting | var map: L.Map;
// Defaults
L.control.locate().addTo(map);
// Simple
var lc = L.control.locate({
position: 'topright',
strings: {
title: "Show me where I am, yo!"
}
}).addTo(map);
// Locate Options
map.addControl(L.control.locate({
locateOptions: {
maxZoom: 10,
enableHighAccur... | var map = L.map('map', {
center: [51.505, -0.09],
zoom: 13
});
// Defaults
L.control.locate().addTo(map);
// Simple
var lc = L.control.locate({
position: 'topright',
strings: {
title: "Show me where I am, yo!"
}
}).addTo(map);
// Locate Options
map.addControl(L.control.locate({
locate... |
Add webp and avif as image format | /**
* Extensions of all assets that can be served via url
*/
export const imageAssetsExtensions = [
'bmp',
'gif',
'ico',
'jpeg',
'jpg',
'png',
'svg',
'tif',
'tiff',
];
| /**
* Extensions of all assets that can be served via url
*/
export const imageAssetsExtensions = [
'bmp',
'gif',
'ico',
'jpeg',
'jpg',
'png',
'svg',
'tif',
'tiff',
'webp',
'avif',
];
|
Implement unit test for map layers reducer | /* tslint:disable:no-unused-variable */
/*!
* Map Layers Reducer Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { async, inject } from '@angular/core/testing';
import { MapLayersReducer } from './map-layers.reducer';
describe('NgRx Store Reducer: Map Laye... | /* tslint:disable:no-unused-variable */
/*!
* Map Layers Reducer Test
*
* Copyright(c) Exequiel Ceasar Navarrete <esnavarrete1@up.edu.ph>
* Licensed under MIT
*/
import { async, inject } from '@angular/core/testing';
import { MapLayersReducer, LayerState } from './map-layers.reducer';
import { assign } from 'lod... |
Fix ordered list start ordinal test |
import { expect } from 'chai'
import * as Up from '../../index'
import { OrderedListNode } from '../../SyntaxNodes/OrderedListNode'
function listStart(text: string): number {
const list = <OrderedListNode>Up.toAst(text).children[0]
return list.start()
}
describe('An ordered list that does not start with a numer... |
import { expect } from 'chai'
import * as Up from '../../index'
import { OrderedListNode } from '../../SyntaxNodes/OrderedListNode'
function listStart(text: string): number {
const list = <OrderedListNode>Up.toAst(text).children[0]
return list.start()
}
describe('An ordered list that does not start with a numer... |
Revert "reverting to old style, using async didn't achieve anything" | import { ComponentFixture, async } from '@angular/core/testing';
import { TestUtils } from '../../test-utils';
import { ClickerButton } from './clickerButton';
import { ClickerMock } from '../../models/clicker.mock';
let fixture: ComponentFixture<ClickerButton> = null;
let instance:... | import { ComponentFixture, async } from '@angular/core/testing';
import { TestUtils } from '../../test-utils';
import { ClickerButton } from './clickerButton';
import { ClickerMock } from '../../models/clicker.mock';
let fixture: ComponentFixture<ClickerButton> = null;
let instance:... |
Fix a mistake in an Error message | import Day from './Day'
export default class Model {
private _checkInDate: Day
private _checkOutDate: Day
constructor(checkInDate: Day, checkOutDate: Day) {
if (checkOutDate.toMoment().isBefore(checkInDate.toMoment())) {
throw new Error(
`Check-out date can be before ch... | import Day from './Day'
export default class Model {
private _checkInDate: Day
private _checkOutDate: Day
constructor(checkInDate: Day, checkOutDate: Day) {
if (checkOutDate.toMoment().isBefore(checkInDate.toMoment())) {
throw new Error(
`Check-out date can't be before ... |
Disable firebase logging on production | import {applyMiddleware, createStore} from 'redux'
import flowRight from 'lodash-es/flowRight'
import * as firebase from 'firebase/app'
import {reducer} from './reducer'
import {reactReduxFirebase} from 'react-redux-firebase'
const middlewares = []
// Redux-logger plugin
if (process.env.NODE_ENV === 'development') {
... | import {applyMiddleware, createStore} from 'redux'
import flowRight from 'lodash-es/flowRight'
import * as firebase from 'firebase/app'
import {reducer} from './reducer'
import {reactReduxFirebase} from 'react-redux-firebase'
const middlewares = []
// Redux-logger plugin
if (process.env.NODE_ENV === 'development') {
... |
Fix test helpers import path | import { TestContext } from 'ember-test-helpers';
import Pretender from 'pretender';
export default function setupPretender(hooks: NestedHooks) {
hooks.beforeEach(function(this: TestContext) {
this.server = new Pretender();
});
hooks.afterEach(function(this: TestContext) {
this.server.shutdown();
});
... | import { TestContext } from '@ember/test-helpers';
import Pretender from 'pretender';
export default function setupPretender(hooks: NestedHooks) {
hooks.beforeEach(function(this: TestContext) {
this.server = new Pretender();
});
hooks.afterEach(function(this: TestContext) {
this.server.shutdown();
});... |
Fix sort language switch items alphabethical. | import { Component } from '@angular/core';
import { Language, LanguageService } from '@picturepark/sdk-v1-angular';
@Component({
selector: 'pp-language-switch',
templateUrl: './language-switch.component.html',
styleUrls: ['./language-switch.component.scss'],
})
export class LanguageSwitchComponent {
get langua... | import { Component } from '@angular/core';
import { Language, LanguageService } from '@picturepark/sdk-v1-angular';
import { TranslatePipe } from '../../shared-module/pipes/translate.pipe';
@Component({
selector: 'pp-language-switch',
templateUrl: './language-switch.component.html',
styleUrls: ['./language-switc... |
Add AuthInfo and AuthGuard into the AuthModule | import { NgModule, ModuleWithProviders } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { TokenInterceptor } from './interceptors/token.interceptor';
import { JwtHelper } from './helpers/jwt.helper';
import { TokenService } from './services/token.service';
import { AuthService } ... | import { NgModule, ModuleWithProviders } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { TokenInterceptor } from './interceptors/token.interceptor';
import { JwtHelper } from './helpers/jwt.helper';
import { TokenService } from './services/token.service';
import { AuthService } ... |
Update canLoad to access full route (w/parameters) | import { Injectable } from '@angular/core';
import { CanActivate, CanLoad, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router, Route } from '@angular/router';
import { Observable } from 'rxjs';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root'
})
export class AuthGuard implemen... | import { Injectable } from '@angular/core';
import { CanActivate, CanLoad, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree, Router, Route, UrlSegment } from '@angular/router';
import { Observable } from 'rxjs';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root',
})
export class AuthG... |
Enable use of Row custom component | import * as React from 'react';
import { Head, Row } from '../../components';
import { useDayPicker } from '../../hooks';
import { UIElement } from '../../types';
import { getWeeks } from './utils/getWeeks';
/**
* The props for the [[Table]] component.
*/
export interface TableProps {
/** The month used to render... | import * as React from 'react';
import { Head } from '../../components';
import { useDayPicker } from '../../hooks';
import { UIElement } from '../../types';
import { getWeeks } from './utils/getWeeks';
/**
* The props for the [[Table]] component.
*/
export interface TableProps {
/** The month used to render the ... |
Fix instance of content not converted to value | /*
R Markdown Editor Actions
*/
import { Actions } from "../markdown-editor/actions";
import { convert } from "./rmd2md";
import { FrameTree } from "../frame-tree/types";
export class RmdActions extends Actions {
_init2(): void {
if (!this.is_public) {
// one extra thing after markdown.
this._init_r... | /*
R Markdown Editor Actions
*/
import { Actions } from "../markdown-editor/actions";
import { convert } from "./rmd2md";
import { FrameTree } from "../frame-tree/types";
export class RmdActions extends Actions {
_init2(): void {
if (!this.is_public) {
// one extra thing after markdown.
this._init_r... |
Remove console.log after verifying the correct files are ignored | import {PluginObj} from '@babel/core'
import {NodePath} from '@babel/traverse'
import {Program} from '@babel/types'
import commonjsPlugin from '@babel/plugin-transform-modules-commonjs'
// Rewrite imports using next/<something> to next-server/<something>
export default function NextToNextServer (...args: any): PluginOb... | import {PluginObj} from '@babel/core'
import {NodePath} from '@babel/traverse'
import {Program} from '@babel/types'
import commonjsPlugin from '@babel/plugin-transform-modules-commonjs'
// Rewrite imports using next/<something> to next-server/<something>
export default function NextToNextServer (...args: any): PluginOb... |
Add comments for exported interface types | import { Observable } from 'rxjs';
import { FilterOptions } from './collection';
export { Database } from './database';
export { Collection } from './collection';
export { Query } from './query';
/**
* IDatabase
* ...
*/
export interface IDatabase {
collection( name ): ICollection;
}
/**
* ICollection
* ...
... | import { Observable } from 'rxjs';
import { FilterOptions } from './collection';
export { Database } from './database';
export { Collection } from './collection';
export { Query } from './query';
/**
* IDatabase
* IDatabase contains a set of collections which stores documents.
*/
export interface IDatabase {
c... |
Correct visibility of StoryList custom element | import {
bindable,
customElement
} from 'aurelia-framework';
@customElement('hn-story-list')
export class StoryList {
@bindable() private readonly stories: any[];
@bindable() private readonly offset: number;
}
| import {
bindable,
customElement
} from 'aurelia-framework';
@customElement('hn-story-list')
export class StoryList {
@bindable() readonly stories: any[];
@bindable() readonly offset: number;
}
|
Add default parameters of calculator method | import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: "/app/app.component.tpl.html"
})
export class AppComponent {
operation:string;
firstvalue:number = 0;
scdvalue:number = 0;
result:number = 0;
listOperation: Array<{firstvalue:number,scdvalue:number,oper... | import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: "/app/app.component.tpl.html"
})
export class AppComponent {
operation: string = 'x';
fstvalue: number = 0;
scdvalue: number = 0;
result: number = 0;
listOperation: Array<{ firstvalue: number, scdvalue:... |
Add ability to blissfully ignore certain nodes | import { Node, SyntaxKind, SourceFile } from 'typescript';
import { emitImportDeclaration } from './imports';
import { emitFunctionLikeDeclaration } from './functions';
import { emitExpressionStatement, emitCallExpressionStatement } from './expressions';
import { emitIdentifier, emitType } from './identifiers';
import ... | import { Node, SyntaxKind, SourceFile } from 'typescript';
import { emitImportDeclaration } from './imports';
import { emitFunctionLikeDeclaration } from './functions';
import { emitExpressionStatement, emitCallExpressionStatement } from './expressions';
import { emitIdentifier, emitType } from './identifiers';
import ... |
Fix top page component test | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { TopPageComponent } from './top-page.component';
describe('TopPageComponent', () => {
let component: TopPageComponent;
let fixture: ComponentFixture<TopPageComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({... | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ImageService } from '../../gallery/image.service';
import { MockImageService } from '../../gallery/mocks/mock-image.service';
import { GalleryFormatPipe } from '../../galler... |
Add new public addCommand functions | import { Injectable } from '@angular/core';
import artyomjs = require('artyom.js');
@Injectable()
export class VoiceService {
private voiceProvider: IVoiceProvider = new ArtyomProvider();
constructor() { }
public say(text: string) {
console.log("Saying: ", text);
this.voiceProvider.say(text);
}
... | import { Injectable } from '@angular/core';
import artyomjs = require('artyom.js');
import ArtyomCommand = Artyom.ArtyomCommand;
import * as _ from "lodash";
@Injectable()
export class VoiceService {
private voiceProvider: IVoiceProvider = new ArtyomProvider();
constructor() { }
public say(text: string) {
... |
Fix logical error in `computeBestTime` | import { ConnectionStatus } from "./interfaces";
import * as m from "moment";
import { isString, max } from "lodash";
export function maxDate(l: m.Moment, r: m.Moment): string {
const dates = [l, r].map(y => y.toDate());
return (max(dates) || dates[0]).toJSON();
}
export function getStatus(cs: ConnectionStatus | ... | import { ConnectionStatus } from "./interfaces";
import * as m from "moment";
import { isString, max } from "lodash";
export function maxDate(l: m.Moment, r: m.Moment): string {
const dates = [l, r].map(y => y.toDate());
return (max(dates) || dates[0]).toJSON();
}
export function getStatus(cs: ConnectionStatus | ... |
Use namespace prefix for style tag | import { isBrowser } from './browser'
/**
* Injects a string of CSS styles to a style node in <head>
*/
export function injectCSS(css: string): void {
if (isBrowser) {
const style = document.createElement('style')
style.type = 'text/css'
style.textContent = css
style.setAttribute('data-tippy-styles... | import { isBrowser } from './browser'
/**
* Injects a string of CSS styles to a style node in <head>
*/
export function injectCSS(css: string): void {
if (isBrowser) {
const style = document.createElement('style')
style.type = 'text/css'
style.textContent = css
style.setAttribute('data-__NAMESPACE_... |
Update dependency checking for ImageMagick | import Logger from './logger';
import { execSync } from 'child_process';
export default class {
private logger: Logger;
constructor() {
this.logger = new Logger('Deps');
}
public showAll(): void {
this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/));
this.show('Redis'... | import Logger from './logger';
import { execSync } from 'child_process';
export default class {
private logger: Logger;
constructor() {
this.logger = new Logger('Deps');
}
public showAll(): void {
this.show('MongoDB', 'mongo --version', x => x.match(/^MongoDB shell version:? (.*)\r?\n/));
this.show('Redis'... |
Add todo for fixing auth | import React from 'react';
import { Redirect } from 'react-router';
export const Authenticated = ({ location }) =>
location.referrer !== location.url ? (
<Redirect
to={{
pathname: location.referrer
}}
/>
) : (
<div>You have been successfully logged in</div>
);
| import React from 'react';
import { Redirect } from 'react-router';
//TODO: Redirect back to correct path
export const Authenticated = ({ location }) =>
location.referrer !== location.url ? (
<Redirect
to={{
pathname: location.referrer
}}
/>
) : (
<div>You have been successfully log... |
Check render() API arguments at runtime. | /*
This is the main module, it exports the 'render' API.
The compiled modules are bundled by Webpack into 'var' (script tag) and 'commonjs' (npm)
formatted libraries.
*/
/* tslint:disable */
import {renderSource} from './render'
import * as options from './options'
import * as quotes from './quotes'
/* tslint:... | /*
This is the main module, it exports the 'render' API.
The compiled modules are bundled by Webpack into 'var' (script tag) and 'commonjs' (npm)
formatted libraries.
*/
/* tslint:disable */
import {renderSource} from './render'
import * as options from './options'
import * as quotes from './quotes'
/* tslint:... |
Add blank line after copyright |
// Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
// Copyright 2018 The Outline Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agr... |
Fix undefined error in PlayComponent.stopNote | import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillat... | import { Component } from '@angular/core';
/**
* This class represents the lazy loaded PlayComponent.
*/
@Component({
moduleId: module.id,
selector: 'sd-play',
templateUrl: 'play.component.html',
styleUrls: ['play.component.css']
})
export class PlayComponent {
audioContext: AudioContext;
currentOscillat... |
Revert "Apparently null is a-ok for array/record of things" | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import { forEach } from 'lodash';
export function classWithModifiers(className: string, modifiers?: string[] | Record<string, boolean>) {
le... | // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
// See the LICENCE file in the repository root for full licence text.
import { forEach } from 'lodash';
type Modifiers = (string | null | undefined)[] | Record<string, boolean | null | undefined>;
export functio... |
Remove needless substitutions to a temporary variable x | /**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Koya Sakuma
* Adapted from MolQL implemtation of atom-set.ts
*
* Copyright (c) 2017 MolQL contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com... | /**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Koya Sakuma
* Adapted from MolQL implemtation of atom-set.ts
*
* Copyright (c) 2017 MolQL contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com... |
Use the export function-style rather than export const | import { Repository } from '../../../models/repository'
import { IAPIRepository } from '../../api'
import { GitStore } from '../git-store'
export const updateRemoteUrl = async (
gitStore: GitStore,
repository: Repository,
apiRepo: IAPIRepository
): Promise<void> => {
// I'm not sure when these early exit condi... | import { Repository } from '../../../models/repository'
import { IAPIRepository } from '../../api'
import { GitStore } from '../git-store'
export async function updateRemoteUrl(
gitStore: GitStore,
repository: Repository,
apiRepo: IAPIRepository
): Promise<void> {
// I'm not sure when these early exit conditio... |
Add titlePage to first page header | // Page numbers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Header, Packer, PageBreak, PageNumber, Paragraph, TextRun } from "../build";
const doc = new Document();
doc.addSection({
headers: {
default: new Header({
... | // Page numbers
// Import from 'docx' rather than '../build' if you install from npm
import * as fs from "fs";
import { AlignmentType, Document, Footer, Header, Packer, PageBreak, PageNumber, Paragraph, TextRun } from "../build";
const doc = new Document();
doc.addSection({
properties: {
titlePage: true,
... |
Add proxy prefix to HsConfig | export class HsConfig {
cesiumTime: any;
componentsEnabled: any;
mapInteractionsEnabled: boolean;
allowAddExternalDatasets: boolean;
sidebarClosed: boolean;
layer_order: string;
box_layers: Array<any>;
senslog: any;
cesiumdDebugShowFramesPerSecond: boolean;
cesiumShadows: number;
cesiumBase: strin... | export class HsConfig {
cesiumTime: any;
componentsEnabled: any;
mapInteractionsEnabled: boolean;
allowAddExternalDatasets: boolean;
sidebarClosed: boolean;
layer_order: string;
box_layers: Array<any>;
senslog: any;
cesiumdDebugShowFramesPerSecond: boolean;
cesiumShadows: number;
cesiumBase: strin... |
Add interface for settings provider | import { Injectable } from '@angular/core';
@Injectable()
export class TubularSettingsService {
constructor() {
}
public put(id: string, value: string) {
localStorage.setItem(id, JSON.stringify(value));
}
public get(key: string): any {
return JSON.parse(localStorage.getItem(key))... | import { Injectable } from '@angular/core';
export interface ITubularSettingsProvider {
put(id: string, value: string): void;
get(key: string): any;
delete(key: string): void;
}
@Injectable()
export class TubularSettingsService {
constructor() {
}
public put(id: string, value: string) {
... |
Fix some useMulti parameters accidentally being passed as view terms | import React from 'react';
import { useMulti } from '../../lib/crud/withMulti';
import { Components, registerComponent } from '../../lib/vulcan-lib';
import { useCurrentUser } from '../common/withUser';
export const GardenCodesList = ({classes, terms}:{classes:ClassesType, terms: GardenCodesViewTerms}) => {
const { ... | import React from 'react';
import { useMulti } from '../../lib/crud/withMulti';
import { Components, registerComponent } from '../../lib/vulcan-lib';
import { useCurrentUser } from '../common/withUser';
export const GardenCodesList = ({classes, terms}:{classes:ClassesType, terms: GardenCodesViewTerms}) => {
const { ... |
Fix crashing using moment utils on datepicker page | import dayjs, { Dayjs } from 'dayjs';
import moment, { Moment } from 'moment';
import { DateTime } from 'luxon';
export function cloneCrossUtils(date: Date | Moment | DateTime | Dayjs) {
if (date instanceof dayjs) {
return (date as Dayjs).clone().toDate();
}
if (date instanceof moment) {
return (date as... | import dayjs, { Dayjs } from 'dayjs';
import moment, { Moment } from 'moment';
import { DateTime } from 'luxon';
export function cloneCrossUtils(date: Date | Moment | DateTime | Dayjs) {
if (date instanceof dayjs) {
return (date as Dayjs).clone().toDate();
}
if (moment.isMoment(date)) {
return (date as ... |
Throw an error if no steps are provided | import { parse, IGitProgress } from './parser'
export interface IProgressStep {
title: string
weight: number
}
export interface ICombinedProgress {
percent: number
details: IGitProgress
}
export class StepProgressParser {
private readonly steps: ReadonlyArray<IProgressStep>
private stepIndex = 0
publi... | import { parse, IGitProgress } from './parser'
export interface IProgressStep {
title: string
weight: number
}
export interface ICombinedProgress {
percent: number
details: IGitProgress
}
export class StepProgressParser {
private readonly steps: ReadonlyArray<IProgressStep>
private stepIndex = 0
publi... |
Change in default test delay | export function delay (timeout) {
return new Promise<void>(resolve => {
setTimeout(resolve, timeout)
})
}
// for some reason editor.action.triggerSuggest needs more delay at the beginning when the process is not yet warmed up
// let's start from high delays and then slowly go to lower delays
let delayS... | export function delay (timeout) {
return new Promise<void>(resolve => {
setTimeout(resolve, timeout)
})
}
// for some reason editor.action.triggerSuggest needs more delay at the beginning when the process is not yet warmed up
// let's start from high delays and then slowly go to lower delays
let delayS... |
Fix uievent to fix typedoc | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import TelemetryEvent from "./TelemetryEvent";
import { prependEventNamePrefix } from "./TelemetryUtils";
export const EVENT_KEYS = {
USER_CANCELLED: prependEventNamePrefix("user_cancelled"),
ACCESS_DENIED: ... | /*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import TelemetryEvent from "./TelemetryEvent";
import { prependEventNamePrefix } from "./TelemetryUtils";
export const EVENT_KEYS = {
USER_CANCELLED: prependEventNamePrefix("user_cancelled"),
ACCESS_DENIED: ... |
Make source code accessible from outside | export { ColorPalette, ColorItem, IconGallery, IconItem, Typeset } from '@storybook/components';
export * from './Anchor';
export * from './ArgsTable';
export * from './Canvas';
export * from './Description';
export * from './DocsContext';
export * from './DocsPage';
export * from './DocsContainer';
export * from './D... | export { ColorPalette, ColorItem, IconGallery, IconItem, Typeset } from '@storybook/components';
export * from './Anchor';
export * from './ArgsTable';
export * from './Canvas';
export * from './Description';
export * from './DocsContext';
export * from './DocsPage';
export * from './DocsContainer';
export * from './D... |
Patch for wrong Firefox add-ons CSS MIME type | async function getOKResponse(url: string, mimeType?: string) {
const response = await fetch(
url,
{
cache: 'force-cache',
credentials: 'omit',
},
);
if (mimeType && !response.headers.get('Content-Type').startsWith(mimeType)) {
throw new Error(`Mime ty... | import {isFirefox} from './platform';
async function getOKResponse(url: string, mimeType?: string) {
const response = await fetch(
url,
{
cache: 'force-cache',
credentials: 'omit',
},
);
// Firefox bug, content type is "application/x-unknown-content-type"
... |
Build is stable so debug log removed | import * as fs from "fs";
import * as child from "child_process";
import * as path from "path";
export function getWasmInstance(sourcePath: string, outputFile?:string): WebAssembly.Instance {
outputFile = outputFile || sourcePath.replace(".tbs", ".wasm");
let result = child.spawnSync(path.join(__dirname, '../.... | import * as fs from "fs";
import * as child from "child_process";
import * as path from "path";
export function getWasmInstance(sourcePath: string, outputFile?:string): WebAssembly.Instance {
outputFile = outputFile || sourcePath.replace(".tbs", ".wasm");
let result = child.spawnSync(path.join(__dirname, '../.... |
Set return type of onAuthStateChanged function | import * as firebase from "firebase";
const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID;
export function initialize(): void {
firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: `${projectId}.firebaseapp.com`,
databaseURL: `https://${projectId}.fi... | import * as firebase from "firebase";
const projectId = process.env.REACT_APP_FIREBASE_PROJECT_ID;
export function initialize(): void {
firebase.initializeApp({
apiKey: process.env.REACT_APP_FIREBASE_API_KEY,
authDomain: `${projectId}.firebaseapp.com`,
databaseURL: `https://${projectId}.fi... |
Make Read on NotificationFilterSet required |
interface INotificationFilterSet
{
read?: boolean;
subjectType: string[];
reasonType: string[];
repository: number[];
}; |
interface INotificationFilterSet
{
read: boolean;
subjectType: string[];
reasonType: string[];
repository: number[];
}; |
Load DB settings in parallel | import { setPublicSettings, getServerSettingsCache, setServerSettingsCache, registeredSettings } from '../../../lib/settingsCache';
import { getDatabase } from '../lib/mongoCollection';
export async function refreshSettingsCaches() {
const db = getDatabase();
if (db) {
const table = db.collection("databasemeta... | import { setPublicSettings, getServerSettingsCache, setServerSettingsCache, registeredSettings } from '../../../lib/settingsCache';
import { getDatabase } from '../lib/mongoCollection';
export async function refreshSettingsCaches() {
const db = getDatabase();
if (db) {
const table = db.collection("databasemeta... |
Add unit tests for OvApiService | import { TestBed } from '@angular/core/testing';
import { OvApiService } from './ov-api.service';
import { HttpClientTestingModule } from '@angular/common/http/testing';
describe('OvApiService', () => {
let service: OvApiService;
beforeEach(() => {
TestBed.configureTestingModule({
imports... | import { TestBed } from '@angular/core/testing';
import { OvApiService } from './ov-api.service';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
describe('OvApiService', () => {
let service: OvApiService;
let httpTestingController: HttpTestingController;
b... |
Remove the update changelog setp | import * as fs from "fs"
// Update the CHANGELOG with the new version
const changelog = fs.readFileSync("CHANGELOG.md", "utf8")
const newCHANGELOG = changelog.replace(
"<!-- Your comment below this -->",
`<!-- Your comment below this -->
# ${process.env.VERSION}
`
)
fs.writeFileSync("CHANGELOG.md", newCHANGELOG,... | // import * as fs from "fs"
// // Update the CHANGELOG with the new version
// const changelog = fs.readFileSync("CHANGELOG.md", "utf8")
// const newCHANGELOG = changelog.replace(
// "<!-- Your comment below this -->",
// `<!-- Your comment below this -->
// # ${process.env.VERSION}
// `
// )
// fs.writeFileSync... |
Remove all Signature child nodes | import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/... | import { Select, XE, XmlError } from "xml-core";
import { Transform } from "../transform";
/**
* Represents the enveloped signature transform for an XML digital signature as defined by the W3C.
*/
export class XmlDsigEnvelopedSignatureTransform extends Transform {
public Algorithm = "http://www.w3.org/2000/09/... |
Expand hero selector view to more height | import { Component, Input, Output, EventEmitter } from '@angular/core';
import { HeroesService, IHero } from '../services/heroes.service';
@Component({
selector: 'hero-selector',
template: `
<div class="modal" [class.is-active]="active">
<div class="modal-background"></div>
<div class="moda... | import { Component, Input, Output, EventEmitter } from '@angular/core';
import { HeroesService, IHero } from '../services/heroes.service';
@Component({
selector: 'hero-selector',
template: `
<div class="modal" [class.is-active]="active">
<div class="modal-background"></div>
<div class="moda... |
Fix timing when download is really finished | import axios from 'axios';
import { createWriteStream } from 'fs';
import * as cp from 'child_process';
export async function download(from: string, to: string) {
const { data } = await axios({
method: 'get',
url: from,
responseType:'stream',
});
return new Promise((resolve, reject) => {
data.pi... | import axios from 'axios';
import { createWriteStream } from 'fs';
import * as cp from 'child_process';
export async function download(from: string, to: string) {
const { data } = await axios({
method: 'get',
url: from,
responseType:'stream',
});
return new Promise((resolve, reject) => {
const w... |
Improve display of test RSS data | import m = require("mithril");
import testData = require("./rssFeedExampleFromFSF");
export function initialize() {
console.log("test data:", testData)
console.log("RSS plugin initialized");
}
export function display() {
return m("div.rssPlugin", ["RSS feed reader plugin", m("pre", JSON.stringify(testDat... | import m = require("mithril");
import testData = require("./rssFeedExampleFromFSF");
export function initialize() {
console.log("test data:", testData)
console.log("RSS plugin initialized");
}
function displayItem(item) {
var title = item.title;
var link = item.link;
var description = item.desc;
... |
Call refreshInformation on URL change | import { Component, OnInit } from '@angular/core';
import { PlantListService } from "./plant-list.service";
import { Plant } from "./plant";
import {Params, ActivatedRoute} from "@angular/router";
@Component({
selector: 'bed-component',
templateUrl: 'bed.component.html',
})
export class BedComponent implement... | import { Component, OnInit } from '@angular/core';
import { PlantListService } from "./plant-list.service";
import { Plant } from "./plant";
import {Params, ActivatedRoute, Router} from "@angular/router";
@Component({
selector: 'bed-component',
templateUrl: 'bed.component.html',
})
export class BedComponent i... |
Update message to state changes will only be stored on the current branch | import * as React from 'react'
import { DialogContent } from '../dialog'
import { TextArea } from '../lib/text-area'
import { LinkButton } from '../lib/link-button'
interface IGitIgnoreProps {
readonly text: string | null
readonly isDefaultBranch: boolean
readonly onIgnoreTextChanged: (text: string) => void
re... | import * as React from 'react'
import { DialogContent } from '../dialog'
import { TextArea } from '../lib/text-area'
import { LinkButton } from '../lib/link-button'
interface IGitIgnoreProps {
readonly text: string | null
readonly isDefaultBranch: boolean
readonly onIgnoreTextChanged: (text: string) => void
re... |
Call the create client edge function |
import express = require('express');
import path = require('path');
import fs = require('fs');
import edge = require('edge');
const app = require('../application');
const createClientEdge = edge.func(function () {/*
async (input) => {
return ".NET Welcomes " + input.ToString();
}
*/});
export function creat... |
import express = require('express');
import path = require('path');
import fs = require('fs');
import edge = require('edge');
const app = require('../application');
const createClientEdge = edge.func(function () {/*
async (input) => {
return ".NET Welcomes " + input.ToString();
}
*/});
export function creat... |
Make it possible to convert an entire directory at once | import * as fs from 'fs';
import build from './build';
import * as parseArgs from 'minimist';
for (let arg of parseArgs(process.argv.slice(2))._) {
console.log(build(fs.readFileSync(arg, {encoding:'utf8'})));
}
| import * as fs from 'fs';
import build from './build';
import * as parseArgs from 'minimist';
for (let inFile of parseArgs(process.argv.slice(2))._) {
let outFile = inFile.substring(0, inFile.length - ".in.hledger".length) + ".want";
let converted = build(fs.readFileSync(inFile, {encoding:'utf8'}));
fs.writeFile... |
Fix setIcon warning on Android | export default class IndicatorPresenter {
indicate(enabled: boolean): Promise<void> {
let path = enabled
? 'resources/enabled_32x32.png'
: 'resources/disabled_32x32.png';
return browser.browserAction.setIcon({ path });
}
onClick(listener: (arg: browser.tabs.Tab) => void): void {
browser.b... | export default class IndicatorPresenter {
indicate(enabled: boolean): Promise<void> {
let path = enabled
? 'resources/enabled_32x32.png'
: 'resources/disabled_32x32.png';
if (typeof browser.browserAction.setIcon === "function") {
return browser.browserAction.setIcon({ path });
}
else... |
Remove no longer needed declare. | // tslint:disable:interface-name
// tslint:disable:no-empty-interface
interface IWebpackRequire { context: any; }
interface NodeRequire extends IWebpackRequire {}
declare var require: NodeRequire;
const srcContext = require.context("../src/app/", true, /\.ts$/);
srcContext.keys().map(srcContext);
const testContext... | // tslint:disable:interface-name
// tslint:disable:no-empty-interface
interface IWebpackRequire { context: any; }
interface NodeRequire extends IWebpackRequire {}
const srcContext = require.context("../src/app/", true, /\.ts$/);
srcContext.keys().map(srcContext);
const testContext = require.context("./", true, /sp... |
Make func list item active class into a getter | import React, {PureComponent} from 'react'
interface Props {
name: string
onAddNode: (name: string) => void
selectedFunc: string
onSetSelectedFunc: (name: string) => void
}
export default class FuncListItem extends PureComponent<Props> {
public render() {
const {name} = this.props
return (
<l... | import React, {PureComponent} from 'react'
interface Props {
name: string
onAddNode: (name: string) => void
selectedFunc: string
onSetSelectedFunc: (name: string) => void
}
export default class FuncListItem extends PureComponent<Props> {
public render() {
const {name} = this.props
return (
<l... |
Set exact options on routes | import * as React from "react";
import { BrowserRouter, Redirect, Route } from "react-router-dom";
import SignIn from "./SignIn";
import Tasks from "./Tasks";
export default class extends React.Component {
public render() {
return (
<BrowserRouter>
<div>
<Ro... | import * as React from "react";
import { BrowserRouter, Redirect, Route } from "react-router-dom";
import SignIn from "./SignIn";
import Tasks from "./Tasks";
export default class extends React.Component {
public render() {
return (
<BrowserRouter>
<div>
<Ro... |
Improve naming of test members | interface BaseInterface {
required: number;
optional?: number;
}
declare class BaseClass {
baseMethod();
x2: number;
}
interface Child extends BaseInterface {
x3: number;
}
declare class Child extends BaseClass {
x4: number;
method();
}
// checks if properties actually... | interface BaseInterface {
required: number;
optional?: number;
}
declare class BaseClass {
baseMethod();
baseNumber: number;
}
interface Child extends BaseInterface {
additional: number;
}
declare class Child extends BaseClass {
classNumber: number;
method();
}
// chec... |
Change an import statement from double quotes to single quotes. | import * as express from "express"
const app = express()
app.get('/', (req, res) => {
res.send('Hello Typescript!');
})
app.get('/:name', (req, res) => {
const name: string = req.params.name;
res.send('Hello ' + name + '!');
})
app.listen('8080')
console.log('\nApp is running. To view it, open a web browser t... | import * as express from 'express'
const app = express()
app.get('/', (req, res) => {
res.send('Hello Typescript!');
})
app.get('/:name', (req, res) => {
const name: string = req.params.name;
res.send('Hello ' + name + '!');
})
app.listen('8080')
console.log('\nApp is running. To view it, open a web browser t... |
Add a test for the join game form component | import { GameJoinFormComponent } from './game-join-form.component';
import {TestComponentBuilder,
addProviders,
inject,
async,
ComponentFixture} from '@angular/core/testing';
import { Router } from '@angular/router';
class MockRouter {}
describe('join-form game component', () => {
let builder;
beforeEach... | /* tslint:disable:no-unused-variable */
import { addProviders, async, inject } from '@angular/core/testing';
import { GameJoinFormComponent } from './game-join-form.component';
import { Router } from '@angular/router';
class MockRouter {}
describe('GameJoinFormComponent: Testing', () => {
beforeEach(() => {
ad... |
Use ES import to see if it works | import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
import React = require('react');
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
onEventResize?: (args: { event: TEvent, start: string... | import BigCalendar, { BigCalendarProps, Event, stringOrDate } from '../../index';
import React from 'react';
interface withDragAndDropProps<TEvent> {
onEventDrop?: (args: { event: TEvent, start: stringOrDate, end: stringOrDate, allDay: boolean }) => void;
onEventResize?: (args: { event: TEvent, start: stringOrDate... |
Fix how we calculate the position of trackes dropped into the playlist | import React from "react";
interface Coord {
x: number;
y: number;
}
interface Props extends React.HTMLAttributes<HTMLDivElement> {
handleDrop(e: React.DragEvent<HTMLDivElement>, coord: Coord): void;
}
export default class DropTarget extends React.Component<Props> {
supress(e: React.DragEvent<HTMLDivElement>... | import React from "react";
interface Coord {
x: number;
y: number;
}
interface Props extends React.HTMLAttributes<HTMLDivElement> {
handleDrop(e: React.DragEvent<HTMLDivElement>, coord: Coord): void;
}
export default class DropTarget extends React.Component<Props> {
supress(e: React.DragEvent<HTMLDivElement>... |
Add early error message if MAXMIND_LICENSE_KEY is missing for DB download | import path from 'path';
import { downloadFolder } from './constants';
import { setDbLocation } from './db/maxmind/db-helper';
import { downloadDB } from './file-fetch-extract';
const main = async (): Promise<void> => {
const downloadFileLocation = path.join(__dirname, downloadFolder);
await setDbLocation(download... | import path from 'path';
import { downloadFolder } from './constants';
import { setDbLocation } from './db/maxmind/db-helper';
import { downloadDB } from './file-fetch-extract';
const main = async (): Promise<void> => {
const { MAXMIND_LICENSE_KEY } = process.env;
if (!MAXMIND_LICENSE_KEY) {
console.error('You... |
Remove response time bottleneck fix | 'use strict';
export function formatPath(contractPath: string) {
return contractPath.replace(/\\/g, '/');
}
| 'use strict';
export function formatPath(contractPath: string) {
return contractPath.replace(/\\/g, '/');
}
|
Add experiment ID for new image diff UI | /**
* @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 names for data displayed | import * as React from 'react';
import { WeatherLocationData } from '../../model/WeatherLocationData';
interface MonitoringItemProps {
weatherData: WeatherLocationData;
}
class MonitoringItem extends React.Component<MonitoringItemProps, void> {
public render(): JSX.Element {
let temperatureDataToRender: stri... | import * as React from 'react';
import { WeatherLocationData } from '../../model/WeatherLocationData';
interface MonitoringItemProps {
weatherData: WeatherLocationData;
}
class MonitoringItem extends React.Component<MonitoringItemProps, void> {
public render(): JSX.Element {
let temperatureDataToRender: stri... |
Fix the theme prop typings | import { Grommet } from 'grommet';
import merge from 'lodash/merge';
import * as React from 'react';
import styled from 'styled-components';
import { DefaultProps, Theme } from '../../common-types';
import defaultTheme from '../../theme';
import { px } from '../../utils';
import { BreakpointProvider } from './Breakpoin... | import { Grommet } from 'grommet';
import merge from 'lodash/merge';
import * as React from 'react';
import styled from 'styled-components';
import { DefaultProps, Theme } from '../../common-types';
import defaultTheme from '../../theme';
import { px } from '../../utils';
import { BreakpointProvider } from './Breakpoin... |
Update wording of http code errors to point at rawResponse | import { Response } from "request";
import { ApiResponse } from "./types";
export function resolveHttpError(response, message): Error | undefined {
if (response.statusCode < 400) {
return;
}
message = message ? message + " " : "";
message +=
"Status code " +
response.statusCode +
" (" +
r... | import { Response } from "request";
import { ApiResponse } from "./types";
export function resolveHttpError(response, message): Error | undefined {
if (response.statusCode < 400) {
return;
}
message = message ? message + " " : "";
message +=
"Status code " +
response.statusCode +
" (" +
r... |
Add inversion between sma and period. | /// <reference path="_references.ts" />
module Calculator.Orbital {
'use strict';
export function period(sma: number, stdGravParam: number): number {
return 2 * Math.PI * Math.sqrt(Math.pow(sma, 3) / stdGravParam);
}
export function nightTime(radius: number, sma: number, stdGravParam: number... | /// <reference path="_references.ts" />
module Calculator.Orbital {
'use strict';
export function period(sma: number, stdGravParam: number): number {
return 2 * Math.PI * Math.sqrt(Math.pow(sma, 3) / stdGravParam);
}
export function sma(stdGravParam: number, period: number): number {
... |
Make mnemonic unavailable for non private users | import { getHasMigratedAddressKeys } from '@proton/shared/lib/keys';
import { FeatureCode } from '../containers/features';
import { useAddresses } from './useAddresses';
import useFeature from './useFeature';
const useIsMnemonicAvailable = (): boolean => {
const mnemonicFeature = useFeature(FeatureCode.Mnemonic);
... | import { getHasMigratedAddressKeys } from '@proton/shared/lib/keys';
import { FeatureCode } from '../containers/features';
import { useAddresses } from './useAddresses';
import useFeature from './useFeature';
import useUser from './useUser';
const useIsMnemonicAvailable = (): boolean => {
const [user] = useUser();... |
Hide the menu when loading a room | import { ActionShowMenu, ActionHideMenu } from './actions';
import { ActionTypes, Action } from '../actions';
export interface UIState {
isMenuShown: boolean;
isFullscreen: boolean;
}
const initialState: UIState = {
isMenuShown: false,
isFullscreen: false,
};
function handleShowMenu(state: UIState, action: A... | import { ActionShowMenu, ActionHideMenu } from './actions';
import { ActionTypes, Action } from '../actions';
export interface UIState {
isMenuShown: boolean;
isFullscreen: boolean;
}
const initialState: UIState = {
isMenuShown: false,
isFullscreen: false,
};
function handleShowMenu(state: UIState, action: A... |
Change expected type of value in registerEditable | const schema = new Map()
export interface Field {
field: string,
label: string,
component: React.ReactElement<any>,
props?: Object
}
export interface Meta {
type: string,
editorSchema?: Array<Field>,
name?: string,
}
export function registerEditable(type: string,
value: Array<Object> | ((editorSchema... | const schema = new Map()
export interface Field {
field: string,
label: string,
component: React.ReactElement<any>,
props?: Object
}
export interface Meta {
type: string,
editorSchema?: Array<Field>,
name?: string,
}
export function registerEditable(
type: string,
value: Array<Field> | ((editorSche... |
Fix type in test description | import { StorageMock } from '../mocks/mocks';
import { Storage } from '@ionic/storage';
import { TestBed, inject, async } from '@angular/core/testing';
import { SettingService } from './setting-service';
describe('Provider: SettingService', () => {
beforeEach(async(() => {
TestBed.configureTes... | import { StorageMock } from '../mocks/mocks';
import { Storage } from '@ionic/storage';
import { TestBed, inject, async } from '@angular/core/testing';
import { SettingService } from './setting-service';
describe('Provider: SettingService', () => {
beforeEach(async(() => {
TestBed.configureTes... |
Fix implicit any for `WebComponents` global. | /**
* @externs
* @license
* Copyright (c) 2021 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
* at http://polymer.github.io/AUTHORS.txt The complete set of contribut... | /**
* @externs
* @license
* Copyright (c) 2021 The Polymer Project Authors. All rights reserved. This
* code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
* at http://polymer.github.io/AUTHORS.txt The complete set of contribut... |
Update redux-typed to match latest third-party .d.ts files for React and Redux | import * as React from 'react';
import { connect as nativeConnect, ElementClass } from 'react-redux';
interface ClassDecoratorWithProps<TProps> extends Function {
<T extends (typeof ElementClass)>(component: T): T;
props: TProps;
}
export type ReactComponentClass<T, S> = new(props: T) => React.Component<T, S>... | import * as React from 'react';
import { connect as nativeConnect } from 'react-redux';
export type ReactComponentClass<T, S> = new(props: T) => React.Component<T, S>;
export class ComponentBuilder<TOwnProps, TActions, TExternalProps> {
constructor(private stateToProps: (appState: any) => TOwnProps, private action... |
Add cache directory to debug logger | import * as vscode from 'vscode';
import * as os from 'os';
import * as path from 'path';
import { Position } from '../common/motion/position';
import { Range } from '../common/motion/range';
import { logger } from './logger';
const AppDirectory = require('appdirectory');
/**
* This is certainly quite janky! The pro... | import * as vscode from 'vscode';
import * as os from 'os';
import * as path from 'path';
import { Position } from '../common/motion/position';
import { Range } from '../common/motion/range';
import { logger } from './logger';
const AppDirectory = require('appdirectory');
/**
* This is certainly quite janky! The pro... |
Set & declare var on same line |
import NoStringParameterToFunctionCallWalker = require('./utils/NoStringParameterToFunctionCallWalker');
/**
* Implementation of the no-string-parameter-to-function-call rule.
*/
export class Rule extends Lint.Rules.AbstractRule {
public apply(sourceFile : ts.SourceFile): Lint.RuleFailure[] {
var langu... |
import NoStringParameterToFunctionCallWalker = require('./utils/NoStringParameterToFunctionCallWalker');
/**
* Implementation of the no-string-parameter-to-function-call rule.
*/
export class Rule extends Lint.Rules.AbstractRule {
public apply(sourceFile : ts.SourceFile): Lint.RuleFailure[] {
var docum... |
Fix return Promises to match type. | interface PackageMetadata {
name: String;
version: String;
}
interface ApiOptions {
regions: String[];
}
interface ContentOptions {
bucket: String;
contentDirectory: String;
}
interface PublishLambdaOptions {
bucket: String;
}
interface StackConfiguration {
}
interface StackParameters {
}
interface StageD... | interface PackageMetadata {
name: String;
version: String;
}
interface ApiOptions {
regions: String[];
}
interface ContentOptions {
bucket: String;
contentDirectory: String;
}
interface PublishLambdaOptions {
bucket: String;
}
interface StackConfiguration {
changeSetName: String;
stackName: String;
}
inter... |
Fix for cases where esm version of rtl-css-js is hit | import * as rtl from 'rtl-css-js';
export interface JssRTLOptions {
enabled?: boolean;
opt?: 'in' | 'out';
}
export default function jssRTL({ enabled = true, opt = 'out' }: JssRTLOptions = {}) {
return {
onProcessStyle(style: any, _: any, sheet: any) {
if (!enabled) {
if (typeof style.flip ===... | import * as rtl from 'rtl-css-js';
const convert = rtl['default'] || rtl;
export interface JssRTLOptions {
enabled?: boolean;
opt?: 'in' | 'out';
}
export default function jssRTL({ enabled = true, opt = 'out' }: JssRTLOptions = {}) {
return {
onProcessStyle(style: any, _: any, sheet: any) {
if (!enab... |
Add EOL symbol at the end of the file. |
import { saveAs } from 'file-saver';
import { FileFormat } from './FileFormat';
export class FileOperations {
readonly UNKNOWN_FORMAT: string = "UNKNOWN";
readonly NON_SET_DELIMITER: string = "";
// Note: File types
readonly TEXT_FILE_TYPE: string = "text/plain;charset=utf-8";
readonly JSON_FIL... |
import { saveAs } from 'file-saver';
import { FileFormat } from './FileFormat';
export class FileOperations {
readonly UNKNOWN_FORMAT: string = "UNKNOWN";
readonly NON_SET_DELIMITER: string = "";
// Note: File types
readonly TEXT_FILE_TYPE: string = "text/plain;charset=utf-8";
readonly JSON_FIL... |
Refactor question generating to use request.js | import Rails from '@rails/ujs';
import I18n from 'retrospring/i18n';
import { updateDeleteButton } from './delete';
import { showErrorNotification } from 'utilities/notifications';
export function generateQuestionHandler(): void {
Rails.ajax({
url: '/ajax/generate_question',
type: 'POST',
dataType: 'jso... | import { post } from '@rails/request.js';
import I18n from 'retrospring/i18n';
import { updateDeleteButton } from './delete';
import { showErrorNotification } from 'utilities/notifications';
export function generateQuestionHandler(): void {
post('/ajax/generate_question')
.then(async response => {
const d... |
Remove trailing whitespace for Travis | // Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: Tony Stone <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference typ... | // Type definitions for connect-history-api-fallback-exclusions 1.5
// Project: https://github.com/Wirewheel/connect-history-api-fallback#readme
// Definitions by: Tony Stone <https://github.com/tonystonee>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.2
/// <reference typ... |
Fix group initializer for displaying label | import {
GroupLayout,
JsonFormsState,
RankedTester,
rankWith,
uiTypeIs
} from '@jsonforms/core';
import { Component } from '@angular/core';
import { NgRedux } from '@angular-redux/store';
import { JsonFormsIonicLayout } from '../JsonFormsIonicLayout';
@Component({
selector: 'jsonforms-group-layout',
temp... | import {
GroupLayout, JsonFormsProps,
JsonFormsState,
RankedTester,
rankWith,
uiTypeIs
} from '@jsonforms/core';
import { Component } from '@angular/core';
import { NgRedux } from '@angular-redux/store';
import { JsonFormsIonicLayout } from '../JsonFormsIonicLayout';
@Component({
selector: 'jsonf... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.