text stringlengths 10 953k |
|---|
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { RouteDependencies } from '../types';
import {
registerGetRoutes,
... |
import { format, parseISO } from 'date-fns'
import ptBR from 'date-fns/locale/pt-BR';
import { GetStaticPaths, GetStaticProps } from 'next';
import Head from 'next/head';
import Image from 'next/image';
import Link from 'next/link';
import { usePlayer } from '../../contexts/PlayerContext';
import { api } from '../../s... |
import type { LogoutRequest, LogoutResponse } from '$mock/api/models/logout_model';
import { mockLogout } from '$mock/api/user/logout';
/** @type {import('@sveltejs/kit').RequestHandler} */
export async function post({ request }: { request: LogoutRequest }): Promise<LogoutResponse> {
return mockLogout(request);
} |
import { injectable } from "tsyringe";
import { IntlConfig } from "react-intl/lib/types";
export interface ISupportedLocale {
locale: string
text: string,
messages: IntlConfig['messages']
}
export const supportedLocales: ISupportedLocale[] = [
{
locale: 'en',
text: 'English',
m... |
import { useEffect, useRef } from "react";
import { useUuiContext } from "../../";
export interface UseLockProps {
handleLeave: () => Promise<boolean>;
isEnabled?: boolean;
};
export function useLock({ handleLeave, isEnabled }: UseLockProps) {
if (!handleLeave) return;
const context = useUuiContext()... |
// @module: es2020
// @target: es2020
// @filename: 0.ts
export function foo() { return "foo"; }
// @filename: 1.ts
import("./0");
var p1 = import("./0");
p1.then(zero => {
return zero.foo();
})
export var p2 = import("./0");
function foo() {
const p2 = import("./0");
} |
import {Request} from '../lib/request';
import {Response} from '../lib/response';
import {AWSError} from '../lib/error';
import {Service} from '../lib/service';
import {ServiceConfigurationOptions} from '../lib/service';
import {ConfigBase as Config} from '../lib/config-base';
interface Blob {}
declare class Serverless... |
import { LoginComponent } from './../../components/login/login.component';
import { AuthGuard } from './../../services/auth-guard.service';
import { MenuComponent } from './../../components/menu/menu.component';
import { ErrorComponent } from './../../components/shared/error/error.component';
import { NgModule } from '... |
import {createRequire} from "module";
const require = createRequire(import.meta.url);
require("dotenv").config({path: "../../.env"});
// polyfills of browser things
globalThis.WebSocket = require("ws");
globalThis.performance = {now: ()=>Date.now()} as any; |
import { Component, OnInit, HostListener } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router'
import { AppService } from '../app.service';
import { Observable } from 'rxjs/Rx';
import { KeyService } from '../util/key.service'
import 'rxjs/add/operator/map'
//import 'rxjs/add/operator/forkJoi... |
import React from 'react';
import styled from 'styled-components';
import { useVoteButtonsState, Vote } from '@util/hooks/useVoteButtonsState';
import { VoteButton } from './VoteButton';
const S = Object.freeze({
__proto__: null,
VerticalVoteButtons: styled.span`
display: inline-flex;
flex-direction: colu... |
import { Resource } from '@aws-cdk/core';
import { Construct } from 'constructs';
import { Method } from './method';
import { IRestApi } from './restapi';
/**
* @stability stable
*/
export interface DeploymentProps {
/**
* The Rest API to deploy.
*
* @stability stable
*/
readonly api: IRes... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="cs" version="2.0">
<defauCDCodec>UTF-8</defauCDCodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Coindev</source>
<translation>O Coindevu</translation>
</message... |
import * as sinon from "sinon";
export const sandbox = sinon.createSandbox();
afterEach(() => {
sandbox.verifyAndRestore();
});
export function stubAWSAPI<T>(
Service: new (...args: any[]) => T,
method: keyof T,
fake: sinon.SinonSpy,
) {
const service = new Service();
const proto = Object.getPrototypeOf(... |
import { svg } from "./_svg.js";
/**
* https://demo.thi.ng/umbrella/hiccup-carbon-icons/#DATA_STRUCTURED
*/
// prettier-ignore
export const DATA_STRUCTURED = svg(
["circle",
{
r: 1,
cy: 7,
cx: 9,
}],
["path", { d: "M27 22.14V18a2 2 0 00-2-2h-8v-4h9a2 2 0 00... |
import React from "react";
import { InputGroup, FormControl, Col } from "react-bootstrap";
import { FaSearch } from "react-icons/fa";
import { useSelector } from "react-redux";
import { ApplicationState } from "~/store";
import Logo from "@assets/img/logo.png";
import SignIn from "./SignIn";
import { Container, Inpu... |
import * as assert from 'assert'
import {parseQuality, parseMemos} from './utils'
import {txFlags, removeUndefined} from '../../common'
const flags = txFlags.TrustSet
function parseFlag(flagsValue, trueValue, falseValue) {
if (flagsValue & trueValue) {
return true
}
if (flagsValue & falseValue) {
return ... |
import { UrlState } from './urlState'
export function configureRiskView() {
const buttons = Array.from(document.querySelectorAll('.Projects-Button'))
const views = [
document.querySelector('.FinancialView'),
document.querySelector('.RiskView'),
]
buttons[0]?.addEventListener('click', () => {
UrlSt... |
import React, {CSSProperties} from 'react';
import styled from 'styled-components';
import {View} from './View';
import {border} from '../Style/layout';
import {appTheme} from '../Style/appTheme';
type Props = {
className?: string;
style?: CSSProperties;
}
type State = {
}
export class ButtonGroup extends React.... |
export class DynamicCSSRuleError extends Error {
static createMessage(message: string, rule: CSSStyleRule, start: number, end: number): string {
return message + ', '
+ 'in rule: \n\n'
+ rule.selectorText.substring(start - 100, start) + '■■■'
+ rule.selectorText.substring(start, end)
+ '■■... |
type GdsRowProps = {
id?: string
children: any
}
export default function GdsRow({ id, children }: GdsRowProps) {
return (
<tr id={id} className="govuk-table__row">
{children}
</tr>
)
} |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="lv_LV" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About EcoPretium</source>
<translation type="unfinished"/>
</message>
<message>
<location ... |
import Fetcher, { FetchParam } from './Fetcher';
class HTMLFetcher extends Fetcher {
core: Window = window;
fetch(fetchParam: FetchParam): Promise<unknown> {
return this.core.fetch(fetchParam.uri, { headers: fetchParam.headers });
}
}
export default HTMLFetcher; |
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
export { getPageErrorCode, PageError } from './page_error';
export { ConfirmW... |
import * as Container from '../../../util/container'
import * as Constants from '../../../constants/teams'
import * as Chat2Gen from '../../../actions/chat2-gen'
import * as ConfigGen from '../../../actions/config-gen'
import * as Types from '../../../constants/types/teams'
import * as RouteTreeGen from '../../../actio... |
import { Structure as _Structure_ } from "@aws-sdk/types";
export const DeleteRouteTableOutput: _Structure_ = {
type: "structure",
required: [],
members: {}
}; |
import { Component, OnInit } from '@angular/core';
import * as Chartist from 'chartist';
import { CookieService } from 'ngx-cookie-service';
import { Router } from '@angular/router';
import { DashboardService } from 'app/services/dashboard.service';
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard... |
import { IPuppetLaunchError } from '@secret-agent/puppet-interfaces/IPuppetLaunchError';
export default class PuppetLaunchError extends Error implements IPuppetLaunchError {
constructor(message: string, stack: string, readonly isSandboxError: boolean) {
super(message);
this.stack = stack;
this.name = 'Pu... |
import {Component} from '@angular/core';
@Component({
selector: 'ej-app',
templateUrl: './template.component.html',
styleUrls: ['./default.component.css']
})
export class TemplateComponent {
onCreate(event) {
let obj = jQuery('#target').data('ejWaitingPopup');
obj.setModel({template: $('#conten... |
export default CaretBackSharp;
declare function CaretBackSharp({ height, width, style, color, cssClasses, className, onClick }: {
height?: number;
width?: number;
style?: {};
color?: string;
cssClasses?: string;
className?: string;
onClick?: () => any;
}): any; |
import { User } from 'types/User';
import { HOC, branch, renderNothing } from 'recompose';
function getUserName(user: User) {
const fullName = `${user.name || ''} ${user.surname || ''}`.trim();
const name = fullName || user.email || user.phoneNumber || '';
return name;
}
const hideIfNoData = (hasNoData: HOC) =>... |
import { useRoute } from '@react-navigation/native';
import { ModelOfFilmsDetailPageParameters } from '../Models';
export const useFilmsDetailController = () => {
const route = useRoute<ModelOfFilmsDetailPageParameters>();
return {
getController: { film: route.params.film },
};
}; |
import Head from 'next/head';
import { Header } from '../components/Header';
import { InputTask } from '../components/InputTask';
import { UseTasks } from '../hooks/useTasks';
import { Footer } from '../components/Footer';
import styles from '../styles/home.module.scss';
export default function Home() {
const {
... |
import { useMemo } from 'react'
import useTokenProvider from 'app/shared/hooks/useTokenProvider'
const MintSymbol = ({
mintAddress,
separator = ' • ',
isReverse = false,
}: {
mintAddress: string
separator?: string
isReverse?: boolean
}) => {
const tokens = useTokenProvider(mintAddress)
const symbols ... |
declare module 'rebass' |
import { HttpClient } from "@angular/common/http";
import { Injectable } from "@angular/core";
import "rxjs/add/operator/map";
import { RequestProvider } from "../../providers/request/request.provider";
@Injectable()
export class DamagesProvider {
private API_URL = "https://ddnext-apis.herokuapp.com/v1/resistances";... |
import { Component, OnInit, Input } from '@angular/core';
import { FormGroup } from '@angular/forms';
@Component({
selector: 'app-default-form',
templateUrl: './default-form.component.html',
styleUrls: ['./default-form.component.scss']
})
export class DefaultFormComponent implements OnInit {
@Input() pConn$: ... |
import styled from 'styled-components/macro'
export const PopupStyle = styled.div`
position: fixed;
z-index: 99;
width: 100%;
height: 100%;
top: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, 0.5);
.button-wrapper {
display: flex;
align-items: cen... |
import { LuaInfo, TokenInfo, TokenTypes, LuaComment, LuaRange, LuaErrorEnum, LuaError, LuaInfoType} from './TokenInfo';
import {LuaParse} from './LuaParse'
import {CLog} from './Utils'
export class LuaForLogic {
private lp: LuaParse;
constructor(luaparse: LuaParse) {
this.lp = luaparse;
}
/**
... |
import detritus from 'detritus-client';
import fetch from 'node-fetch';
import json from '../../utils/lang/langs.js';
import getGuild from '../../utils/functions/getguild.js';
import { BaseCommandOption } from '../../utils/classes/slash.js';
const { Constants: { ApplicationCommandOptionTypes }} = detritus;
export fun... |
import { Indicator, IndicatorInput } from '../indicator/indicator';
export declare class TRIXInput extends IndicatorInput {
values: number[];
period: number;
}
export declare class TRIX extends Indicator {
result: number[];
generator: IterableIterator<number | undefined>;
constructor(input: TRIXInpu... |
export interface IGameMode {
getMode(): IMode;
setMode(mode: IMode): void;
}
export interface IMode {
dx: number;
dy: number;
lives: number;
maxDx: number;
maxDy: number;
name: string;
}
class Mode {
private dx: number;
private dy: number;
private lives: number;
private maxDx: number;
priva... |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="14"/>
<source>About Moneta Core</source>
<translation>Moneta Çekirdeği Hakkında</translation>
</message>
<message>
... |
import { Alpha2 } from "../Alpha2"
import { Alpha3 } from "../Alpha3"
import { Numeric } from "../Numeric"
export function from(country: Alpha2 | Alpha3 | Numeric): string {
return names[country] || from(Alpha2.from(country as Alpha3 | Numeric))
}
export function parse(country: string): Alpha2 | undefined {
const res... |
import * as React from 'react'
import { FormikErrors, FormikTouched } from 'formik'
import { Select } from 'edikit'
import { IMappingFormValues } from '../../types'
interface IRequestUrlDetailsProps {
values: IMappingFormValues
errors: FormikErrors<IMappingFormValues>
touched: FormikTouched<IMappingFormVal... |
import {EnumValideur} from "./dto";
export class User {
id: number | undefined;
email: string;
firstName: string;
lastName: string;
}
export class RoleDto {
id: number;
name: string;
}
export class UserExt extends User {
roleList: RoleDto[];
valideurState: EnumValideur;
}
export class UserModel extend... |
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license.
//
// Microsoft Bot Framework: http://botframework.com
//
// Bot Framework Emulator Github:
// https://github.com/Microsoft/BotFramwork-Emulator
//
// Copyright (c) Microsoft Corporation
// All rights reserved.
//
// MIT License:
// ... |
/*
* Copyright 2020 Red Hat, Inc. and/or its affiliates.
*
* 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 ... |
/// <reference path="typings/tsd.d.ts"/>
interface mapToolsOptions {
id?: string;
el?: string;
lat: number;
lng: number;
type?: string;
async?: boolean;
sync?: boolean;
on?: {}
}
interface mapToolsCallback {
(err: {}, instance?: {}): void;
}
import maps = require('./maps');
import config = require('... |
export type Value =
| null
| string
| number
| boolean
| Date
| readonly string[]
| readonly number[]
| readonly Date[]
| readonly boolean[]
| Buffer
export interface Raw {
sql: string
bindings: Value[]
}
export interface DatabaseCredentials {
readonly host: string
readonly port: number
readonly user: ... |
export * from './order-approval-root.module'; |
export { formatNumber, parseNumberSafe, useKeypad } from "./keypad";
// Types
export {
IKeypadFlags,
IKeypadRef,
KeypadDigits,
KeypadExtraKeys,
KeypadKeys,
} from "./keypad/keypad.types"; |
import { AuthenticationError } from "../security/Authentication";
export function parseAdalError(error: Error): AuthenticationError {
const parts = error.message.split("{");
const text = parts.length >= 1 ? parts.splice(0, 1)[0] : '';
let object: any = {};
if (parts.length >= 1) {
try {
... |
import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { HttpHeaders } from '@angular/common/http';
import { Observable } from 'rxjs';
import { environment } from '../../../environments/environment';
@Injectable()
export class FileService {
constructor (private http: Ht... |
import { createParser, comparePathParserScore } from '@egoist/path-parser'
import type { PathParser } from '@egoist/path-parser'
export type HTTPMethod =
| 'ACL'
| 'BIND'
| 'CHECKOUT'
| 'CONNECT'
| 'COPY'
| 'DELETE'
| 'GET'
| 'HEAD'
| 'LINK'
| 'LOCK'
| 'M-SEARCH'
| 'MERGE'
| 'MKACTIVITY'
| ... |
import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core';
@Component({
selector: 'senstate-group-holder',
templateUrl: './group-holder.component.html',
styleUrls: ['./group-holder.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class GroupHolderComponent imple... |
import { Router } from "express";
import cardSetControllers from "./cardSet.controller";
const router = Router();
router
.route("/")
.get(cardSetControllers.getMany)
.post(cardSetControllers.createOne);
router
.route("/:id")
.get(cardSetControllers.getOne)
.delete(cardSetControllers.removeOne);
router.r... |
import { CanvasUtility } from './canvas';
import { Shot } from './shot';
import { User } from './user';
import { Opponent } from './opponent';
import { Manager } from './manager';
import './style.styl';
declare global {
interface Window {
KeyDown: { [key: string]: boolean };
}
}
(() => {
window.KeyDown = {... |
/*!
* pemcrypt.js - PEM encryption for javascript
* Copyright (c) 2018-2019, Christopher Jeffrey (MIT License).
* https://github.com/bcoin-org/bcrypto
*
* Resources:
* https://tools.ietf.org/html/rfc1421
*/
import {assert} from '../internal/assert';
import {pem} from './pem';
import {cipher} from '../cipher';... |
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {Notes} from '../../data-variables/overview/notes';
import { Observable } from 'rxjs/Observable';
@Injectable({
providedIn: 'root'
})
export class NotesService {
private _url:string = "/assets/data/notes_mockdata.jso... |
import { ClassDefinition } from '../types'
import { getClassName } from './getClassName'
import { ClassRegistryItem } from '../private/ClassRegistryItem'
import { ClassRegistry } from './ClassRegistry'
import { isString } from 'lodash'
/**
* Decorator to register a class.
*
* @returns {decorator}
*/
export functio... |
import { LaunchFacadeService } from "./../services/launch-facade.service";
import { Component, ChangeDetectionStrategy } from "@angular/core";
@Component({
selector: "app-launch-list",
templateUrl: "./launch-list.component.html",
styleUrls: ["./launch-list.component.css"],
changeDetection: ChangeDetectionStrat... |
import { DomElement, HTMLInstance, IDom, IKeyValue } from "../types";
import { DomDiff } from "./DomDiff";
/**
* Dom 유틸리티
*
*/
export class Dom implements IDom {
el: HTMLInstance;
_initContext: any;
constructor(tag: DomElement, className: string = '', attr: IKeyValue = {}) {
if (typeof tag !== 'string'... |
/**
* Options for binning number values.
* @typedef {object} BinOptions
* @property {number} [maxbins] The maximum number of bins.
* @property {number} [minstep] The minimum step size between bins.
* @property {number} [step] The exact step size to use between bins.
* If specified, the maxbins and minstep option... |
import test from 'ava'
import { connect } from '../src/index'
import { start } from '@saulx/selva-server'
import './assertions'
import { wait } from './assertions'
import getPort from 'get-port'
let srv
let port: number
test.before(async (t) => {
port = await getPort()
srv = await start({
port,
})
await w... |
import React from 'react';
import { useMutation } from "@apollo/client";
import { CloseOutlined } from "@material-ui/icons";
import { Button, Modal } from "@material-ui/core";
import { DELETE_REMOVE_CONTENT } from "../../graphQL/quries";
import Notiflix from 'notiflix';
import {routeHttpStatus} from "../../../utils/fun... |
import * as fs from 'fs'
import * as path from 'path'
import * as LSP from 'vscode-languageserver'
export const FIXTURE_FOLDER = path.join(__dirname, './fixtures/')
function getDocument(uri: string) {
return LSP.TextDocument.create(
'foo',
'bar',
0,
fs.readFileSync(uri.replace('file://', ''), 'utf8'... |
import * as React from 'react';
import { Policy } from './policy';
const PunditContext = React.createContext({ policy: new Policy(null, null) });
interface PunditContextProps {
children: React.ReactNode;
policy: Policy;
}
interface WhenProps {
children: React.ReactNode;
can: string;
}
export const usePundi... |
import styled from 'styled-components';
import { R500 } from '@atlaskit/theme/colors';
export const RequiredIndicator = styled.span`
color: ${R500};
`; |
import { Linter, RuleObjType } from "../../linter";
import { badChars } from "../../util/bad-character-all";
// eslint-disable-next-line @typescript-eslint/no-unused-vars
declare let DEV: boolean;
// rule: bad-character-single-character-introducer
// -------------------------------------------------------------------... |
import {Injectable} from "@angular/core";
import {Observable} from "rxjs";
import {Course} from "../model/course.model";
import {Http} from "@angular/http";
import {User} from "../model/user.model";
@Injectable()
export class UserService {
authorsCandidatesList: User[] = [];
constructor(private http: Http) {
... |
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { QuoteComponent } from './quote.component';
import {LocalStorageService} from '../../core/local-storage/local-storage.service';
import {NotificationService} from '../../core/notifications/notification.service';
import {MatDialog} ... |
import { StatusBar } from 'expo-status-bar';
import React from 'react';
import { AppLoading } from 'expo';
import {
Archivo_400Regular,
Archivo_700Bold,
useFonts,
} from '@expo-google-fonts/archivo';
import {
Poppins_400Regular,
Poppins_600SemiBold,
} from '@expo-google-fonts/poppins';
import AppStack from... |
export { default as BackToTop } from './BackToTop'; |
import { ConsoleLogger, Injectable, NotFoundException } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { FilterQuery, Model } from 'mongoose';
import * as mongoose from "mongoose";
import { Company, CompanyDocument } from './schema/company.schema'
import { MatchListUpdateDto } from './dt... |
import { UserController } from './controllers/user.controller';
import { DeviceController } from './controllers/device.controller';
import express from 'express';
import * as cors from 'cors';
import * as BodyParser from 'body-parser';
import { requestLoggerMiddleware } from './request.logger.middleware';
import Slack... |
import * as path from 'path';
import type { Options, Platform } from '@remax/types';
interface Alias {
[key: string]: string;
}
export default (options: Options, target: Platform) => {
const config: Alias = {
'@': path.resolve(options.cwd, options.rootDir),
// 防止 link 开发时加载多个 React
react: path.dirname... |
import * as React from 'react'
import styled, { css } from 'styled-components'
import { InjectedProps, withTheme } from '../../hocs/withTheme'
import { range } from '../../libs/lodash'
import { NextPaginationItem } from './NextPaginationItem'
import { PaginationItem } from './PaginationItem'
import { PrevPaginationIt... |
import { Component, ChangeDetectorRef } from "@angular/core";
import { CurrencyModel } from '../shared/currency.model';
import { InventorySettingBLService } from "../shared/inventory-settings.bl.service";
import GridColumnSettings from '../../../shared/danphe-grid/grid-column-settings.constant';
import { GridEmitMo... |
export const SIDE_BAR_MINI_WIDTH = 58;
export const SIDE_BAR_SHOW_TIT_MINI_WIDTH = 80;
export enum ContentEnum {
// auto width
FULL = 'full',
// fixed width
FIXED = 'fixed',
}
// app current theme
export enum ThemeModeEnum {
LIGHT = 'light-mode',
DARK = 'dark-mode',
SEMI_DARK = 'semi-dark-mode',
}
// m... |
import { Query } from "../model";
export class DropdownQuestion extends Query<string> {
controlType = "dropdown";
options: { key: string; value: string }[] = [];
constructor(options: { [key: string]: any } = {}) {
super(options);
this.options = options.options || [];
}
} |
import { AuthenticationStatusEnum } from '@/entity/authentication'
import { SessionDrop } from '@/entity/session'
import { uuid } from '@/entity/utils'
import { AuthenticationByAccountRepository } from './protocols/authentication-by-account-repository'
import { AuthenticationUpdateStatusRepository } from './protocols/a... |
/**
* Copyright © 2021 Aditya Sharoff, Gregory Hairfeld, Jesse Coyle, Francis Phan, William Papsco, Jack Sherman, Geoffrey Corvera
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without res... |
import React from 'react'
import { shallow, configure } from 'enzyme'
import Adapter from 'enzyme-adapter-react-16'
import { Button } from '../../../src/'
configure({ adapter: new Adapter() })
jest.mock('InteractionManager')
describe('Button', () => {
test('it render base correctly', () => {
let wrapper
let... |
import { Injectable } from '@nestjs/common';
import { UserService } from 'src/user/user.service';
import * as bcrypt from 'bcrypt';
import { User } from 'src/user/entities/user.entity';
import { UserPayload } from './models/UserPayload';
import { JwtService } from '@nestjs/jwt';
import { UserToken } from './models/User... |
import { Component, OnInit } from '@angular/core';
import { NavController } from '@ionic/angular';
import { StorageService } from '../../services/storage.service';
import {
Ledger,
currency,
convertInr,
convertEUR,
convertUSD,
} from '../../model/bet-form.model';
@Component({
selector: 'app-stats',
templ... |
interface FibonacciSequenceWidgetConfiguration {
targetSequenceLength: number;
sequence?: number[];
}
const initialSequence = [1, 1];
const widgetId = 'fibonacci-sequence-widget';
/**
* An example widget that renders itself recursively. Each widget computes the next number in the
* Fibonacci sequence and di... |
// tslint:disable
/**
* Webitel engine API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 20.12.0
* Contact: support@webitel.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-gene... |
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
import { DialogConfig, DialogRef, DialogService } from '@fundamental-ngx/core/dialog';
import { SortingComponent, SettingsSortDialogData } from './sorting.compon... |
import { Axis, Chart, Coord, Geom, Guide } from 'bizcharts';
import { Html } from 'bizcharts/lib/components/Annotation';
import React from 'react';
import autoHeight from '../autoHeight';
const { Arc, Line } = Guide;
export type GaugeProps = {
title: React.ReactNode;
color?: string;
height?: number;
bgColor?... |
import {provide, scope, ScopeEnum} from '../../src/';
@provide()
@scope(ScopeEnum.Request)
export class UserService {
async getUsers() {
return new Promise(resolve => {
setTimeout(() => {
resolve(['harry', 'jiakun.du']);
}, 100);
});
}
} |
import { Children, cloneElement, forwardRef } from 'react'
import cx from 'clsx'
import { CSSObject } from 'styled-components'
import {
createStyledComponent,
getThemeCSSObject,
ThemeCSSStyles,
themeTernaryOperator as tto
} from '../styles'
import { attachSignatureToComponent, getChromatinElementId } f... |
import { tKeys } from 'services/i18n';
export const validateInteger = (value: string) => {
const numberMessage = tKeys.utils.validation.isNumber.getKey();
const integerMessage = tKeys.utils.validation.mustBeAnInteger.getKey();
return (
(Number.isNaN(Number(value)) && numberMessage) ||
(!Number.isInteger... |
import { Injectable } from '@angular/core';
import { Engine } from './engine';
@Injectable()
export class Car {
constructor(public engine: Engine) { }
accelerate() {
console.log(`Uses ${this.engine.hp}hp to accelerate!`);
}
} |
import {
QueryMySubscriptions_myProfile_subscriptions_edges as ProfileEdge,
QuerySubscriptions_subscriptionTypeCategories_edges as SubscriptionEdge,
} from '../../graphql/generatedTypes';
const subscriptions: SubscriptionEdge[] = [
{
node: {
id: '123',
label: 'UpperLabel',
code: 'UPPER_CODE... |
import { Button, Control } from "@babylonjs/gui";
import { DefenderCosts, PlayerDefaultOptions } from "../config/constants";
import { EntityManager } from "./entityManager";
import { Face } from "./face";
import { Tile } from "./tile";
import { UI } from "./ui";
class Store {
private readonly entities: EntityManag... |
import test from 'ava';
import { isMutable, modify } from '@collectable/core';
import { HashSetStructure, fromArray, size, union } from '../../src';
const mainValues = ['A', 'B', 'C', 'D', 'E'];
const otherValues = ['D', 'E', 'F', 'G'];
const expectedValues = ['A', 'B', 'C', 'D', 'E', 'F', 'G'];
let main: HashSetStru... |
import { SparrowSpikePage } from './app.po';
describe('sparrow-spike App', function() {
let page: SparrowSpikePage;
beforeEach(() => {
page = new SparrowSpikePage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');... |
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup } from '@angular/forms';
import { AuthService } from '../state/auth.service';
import { Creds } from '../state/auth.model';
import { Router } from '@angular/router';
@Component({
templateUrl: './login.component.html'
})
export class Lo... |
export class BrandAAuthService {} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.