text stringlengths 10 953k |
|---|
import { Program } from "../ast/index";
import { createEnvironment } from "./context/environment";
import { InterpreterContext } from "./context/index";
import { createInput } from "./context/input";
import { IO } from "./io";
import { runBlock } from "./runBlock";
export type Interpreter = {
run: (program: Program)... |
import breakpoints, { size } from 'components/core/breakpoints';
import { NftMediaType } from 'components/core/enums';
import styled from 'styled-components';
import ImageWithLoading from 'components/ImageWithLoading/ImageWithLoading';
import { Nft } from 'types/Nft';
import { getMediaType, getResizedNftImageUrlWithFal... |
import { NativescriptUuidCommon } from './common';
import { NativescriptUuidCommon } from './common';
export declare class NativescriptUuid extends NativescriptUuidCommon {} |
export const createEntitiesInstancesArray = <T>(EntityClass: new() => T, dataArray: Partial<T>[] = []): T[] => {
const array: T[] = [];
dataArray.forEach((data: T) => {
const instance = new EntityClass();
const object = Object.assign(instance, data);
array.push(object);
});
return array;
}; |
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { TypeOrmModuleOptions, TypeOrmOptionsFactory } from '@nestjs/typeorm';
@Injectable()
export class TypeOrmConfigService implements TypeOrmOptionsFactory {
constructor(private configService: ConfigService) {}
create... |
import WeakMap from '../../shim/WeakMap';
import Map from '../../shim/Map';
import { Base } from './Base';
import IntersectionObserver from '../../shim/IntersectionObserver';
export interface ExtendedIntersectionObserverEntry extends IntersectionObserverEntry {
readonly isIntersecting: boolean;
}
export interface In... |
import {
parseQuery,
Router,
RouteLocationNormalized,
NavigationFailure,
RouteLocationRaw
} from 'vue-router';
import { createLocationHistory } from './locationHistory';
import { generateId } from './utils';
import {
ExternalNavigationOptions,
RouteInfo,
RouteParams,
RouteAction,
RouteDirection,
I... |
import { config, DOMWrapper, mount } from '@vue/test-utils';
import FixedNav from '../index.vue';
import { nextTick } from 'vue';
import NutIcon from '../../icon/index.vue';
import nutOverlay from '../../overlay/index.vue';
beforeAll(() => {
config.global.components = {
NutIcon,
nutOverlay
};
});
afterAll(... |
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not u... |
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'convert'
})
export class ConvertPipe implements PipeTransform {
transform(value: number, ...args: any[]): any {
const [from, to] = args;
return value && this.metersPerSecondTo(value, from, to);
}
private metersPerSecondTo(value: numb... |
import { Button } from '../button/button';
import { MenuController } from './menu-controller';
import { Navbar } from '../navbar/navbar';
import { ViewController } from '../../navigation/view-controller';
/**
* @name MenuToggle
* @description
* The `menuToggle` directive can be placed on any button to toggle a menu ... |
import axios, { AxiosResponse } from 'axios';
import * as fs from 'fs';
import * as https from 'https';
import { runtimeRoot } from '@vuesion/utils/dist/path';
import { ensureDirectoryExists } from '@vuesion/utils/dist/fileSystem';
import { log, logError, logErrorBold, logInfo, logSuccess, Result } from '@vuesion/utils... |
import React from 'react'
import { global, keyframes } from '@css/theme.config'
const Snurra1 = keyframes({
'0%': {
strokeDashoffset: 0,
},
'100%': {
strokeDashoffset: '-403px',
},
})
const LoaderCSS = global({
body: {
alignItems: 'center',
display: 'flex',
justifyContenten: 'center',
... |
function main() {
const trees = [
[1, "redwood", [1]],
[2, "bay", [1, 2]],
[3, "cedar", [1, 2, 3]],
[4, "oak", [1, 2, 3, 4]],
[5, "maple", [1, 2, 3, 4, 5]],
];
for (const [k, v, a] of trees) {
print(k, v);
for (const ai of a) {
print(ai);... |
import { IStickConfig, IInputConfig } from './../game.config.type';
import { Keyboard } from '../input/keyboard';
import { Mouse } from '../input/mouse';
import { GameConfig } from '../game.config';
import { Assets } from '../assets';
import { Canvas2D } from '../canvas';
import { Vector2 } from '../geom/vector2';
impo... |
export type ImportInstanceExceptionsUnion = never; |
/// <reference lib="dom" />
/**
* @param {string} value
* @returns {string|false}
*/
export function decodeNamedCharacterReference(value: string): string | false; |
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'includes',
pure: false,
})
export class IncludesPipe implements PipeTransform {
transform(arrayData: any[], value: any): boolean {
if (arrayData.includes(value)) {
}
return arrayData.includes(value);
}
} |
import React, { useState } from 'react';
import { View, ScrollView, Text, TouchableOpacity, SafeAreaView } from 'react-native';
import { Card } from 'react-native-elements';
import { BackButton, Button, TextInput } from '../../../components';
import { I18N } from '../../../locales';
import { send } from './ForgetPasswo... |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... |
PType({
name: 'Mattress',
key: 'mattress',
categories: ['furniture'],
attributeRefs: [
...ag.common,
]
}); |
import './auth/passport';
import { Router } from 'express';
import api from './routers/api';
import auth from './auth/routes';
const router = Router();
router.use('/api', api);
router.use('/auth', auth);
export default router; |
/// <reference path='fourslash.ts' />
//// function f() {
//// /*a*/function q() { }
//// q();/*b*/
//// q();
//// }
goTo.select('a', 'b');
verify.not.refactorAvailable("Extract Method"); |
import { Component, OnInit, OnDestroy } from '@angular/core';
import { ItunesService } from '../shared/itunes.service';
import { ActivatedRoute } from '@angular/router';
import { Album } from '../album/album.model';
import { PlayerService } from '../shared/player.service';
@Component({
selector: 'app-tracks',
temp... |
import { getParentIdx, getIndexByIdx } from 'easy-email-core';
import { useCallback, useEffect, useRef, useState } from 'react';
import {
getBlockNodeByChildEle,
getDirectionPosition,
useEditorContext,
useDataTransfer,
useHoverIdx,
useRefState,
} from 'easy-email-editor';
import { BlockManager, getNodeIdxFr... |
export * from './padding';
export * from './case-converter';
export * from './color';
export * from './position-converter'; |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PageHeaderContentComponent } from './page-header-content.component';
@NgModule({
declarations: [PageHeaderContentComponent],
imports: [
CommonModule
],
exports: [PageHeaderContentComponent]
})
export class Pa... |
import { ReactNode } from "react";
import { Panel } from "rsuite";
import styled from "styled-components";
interface $Props {
children: ReactNode;
onClick?: () => void;
}
const Card = ({ children, onClick }: $Props) => {
return (
<CardWrapper onClick={onClick}>
<Panel shaded>{children}</Panel>
</Ca... |
namespace Serenity {
export class ColumnsKeyAttribute {
constructor(public value: string) { }
}
export class DialogTypeAttribute {
constructor(public value: Function) { }
}
export class EditorAttribute {
constructor() { }
key: string;
}
export class Elemen... |
import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { routing } from "./myprofile-routing";
import { MyprofileComponent } from "./myprofile.component";
import { FileUploadModule } from "ng2-file-upload";
imp... |
import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {StoreModule} from '@ngrx/store';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {todoReducer} from './reducers/reducers';
@NgModule({
declarations: [A... |
import chalk from "chalk";
import fs from "fs-extra";
import { glob } from "glob";
import path from "path";
import { Logger } from "tsrpc-proto";
import { i18n } from "../i18n/i18n";
import { CliUtil } from "../models/CliUtil";
import { TsrpcConfig } from "../models/TsrpcConfig";
import { error } from "../models/util";... |
import { useState, useEffect, useRef } from 'react';
import { Nullable } from '../../utils/helpers';
import { printer, PrintableItem, PrinterResponse, createPrinterTask } from '../../API/printer';
type PrinterReturnType = ReturnType<typeof usePrinter>;
const defaultState: PrinterResponse = {
state: [],
remainingL... |
/*!
* Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/
import * as vscode from 'vscode'
import { getLogger, Logger } from '../logger'
import { ResourceFetcher } from '../resourcefetcher/resourcefetcher'
import { Endpoints, loadEndpoints } from './endpo... |
import type { Vector3 } from "three";
export type IntersectingPointsCache = {
[key: string]: Vector3;
}; |
// https://github.com/vitejs/vite/discussions/1791#discussioncomment-321046
import * as Monaco from 'monaco-editor'
// import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker'
import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker'
import cssWorker from 'monaco-editor/esm/vs/l... |
/** @jsx jsx */
import { FC } from 'react'
import Helmet from 'react-helmet'
import { jsx, useColorMode } from 'theme-ui'
const base = {
title: `Ben Romano`,
url: `https://benromano.com`,
description: `Engineer.`,
image: `https://benromano.com/logo.png`,
author: `@benromano`,
hasCodePenEmbed: false,
}
ex... |
import {ConnectionConfig} from "mysql";
import {CardDrop} from "../model/CardDrop";
import {MyConnection, ILogger} from "my-core";
export class CardDropStorage {
private _dbConnection: ConnectionConfig;
private _logger: ILogger;
constructor(dbConnection: ConnectionConfig, logger: ILogger) {
this._... |
import * as React from 'react';
/* tslint:enable:no-unused-variable */
import { ITheme, IStyle } from '@uifabric/styling';
import { IRefObject, IComponentAs } from '@uifabric/utilities';
import { IStyleFunctionOrObject } from '@uifabric/merge-styles';
/**
* {@docCategory Label}
*/
export interface ILabel {}
/**
* {... |
import { AbstractControl } from "@angular/forms";
export default function creditCardValidator(control:AbstractControl): { [key: string]: any } | null {
let ccnNumber = control.value
// Strip spaces and dashes
ccnNumber = ccnNumber.replace(/[ -]/g, '');
// See if the card is valid
/... |
import {BindingKey} from '@loopback/core';
import {BINDING_PREFIX} from './constants';
import {CoreConfig} from './types';
export namespace SFCoreBindings {
export const i18n = BindingKey.create<i18nAPI>(`${BINDING_PREFIX}.i18n`);
export const config = BindingKey.create<CoreConfig>(
'sf.packages.core.config',... |
/* eslint-disable no-param-reassign, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */
import React, { useEffect, useState, useCallback, useRef } from "react";
import { Button, Card, Form, Table } from "react-bootstrap";
import { FormattedMessage, useIntl } from "react-intl";
import _ f... |
import { Block, FinderType, SolFileIndexMap, Node } from "@common/types";
export class BlockNode extends Node {
public astNode: Block;
constructor(
block: Block,
uri: string,
rootPath: string,
documentsAnalyzer: SolFileIndexMap
) {
super(block, uri, rootPath, documentsAnalyzer, undefined);
... |
import { h, Component } from 'preact';
import { ViewRow, ColumnInfo } from '../store/types';
import { connect } from './hoc';
import { cls } from '../helper/dom';
import { DispatchProps } from '../dispatch/create';
import { debounce } from '../helper/common';
import { RowSpanCell } from './rowSpanCell';
import { getHig... |
import React from 'react';
import {Scrollable} from '../Scrollable';
import {classNames} from '../../utilities/css';
import {useTheme} from '../../utilities/theme';
import {useFeatures} from '../../utilities/features';
import {WithinContentContext} from '../../utilities/within-content-context';
import {Image} from '..... |
import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { SEARCH_CONFIG_SERVICE } from '../../../../../../my-dspace-page/my-dspace-page.component';
import { SearchConfigurationService } from '../../../../../../core/shared/search/search-configuration.service';
import { Item } fr... |
import "../styles/globals.scss";
import type { AppProps } from "next/app";
import { PokedexProvider } from "../hooks/usePokedex";
import { CartProvider } from "../hooks/useCart";
function MyApp({ Component, pageProps }: AppProps) {
return (
<PokedexProvider>
<CartProvider>
<Component {...pageProps}... |
import React from 'react';
import { StateType } from '../state/app.types';
import { Provider } from 'react-redux';
import { createShallow, createMount } from '@material-ui/core/test-utils';
import configureStore from 'redux-mock-store';
import SearchButton from './searchButton.component';
import thunk from 'redux-thunk... |
import { Injectable } from '@angular/core';
import { Actions, Effect, ofType } from '@ngrx/effects';
import { Action } from '@ngrx/store';
import { Observable } from 'rxjs';
import { map, mergeMap, tap } from 'rxjs/operators';
import {
AddRealEstate,
AddRealEstateFail,
AddRealEstateSuccess,
CollectionActionTyp... |
import { CodeMirror, TemplateType } from '@syndesis/ui';
import { FreemarkerParser } from '@syndesis/utils';
import i18n from '../../../../../../i18n';
import { AbstractLanguageLint } from './abstract-language-lint';
import { TemplateSymbol } from './template-symbol';
export class FreemarkerModeLint extends AbstractLa... |
import { Body, Controller, Get, Param, Post, UseGuards } from '@nestjs/common';
import { AdminGuard } from 'src/guards/admin.guard';
import { IdGuard } from 'src/guards/id.guard';
import { UserResponse } from 'src/response/user.response';
import { UserDTO } from 'src/validation/user.dto';
import { UserService } from '.... |
import { PrecCApplicationTester } from "./test-function";
module.exports = (test: PrecCApplicationTester) => {
describe("Edge convertion", () => {
const basicGraphs = {
oneEdge: `
:edge a pgo:Edge ; rdf:subject :s ; rdf:predicate :p ; rdf:object :o .
`,
twoEdges: `
:edge... |
import { BasicOrder, Order, OrderWithDetails } from "../types/order";
import { db } from "../db";
import { OkPacket, RowDataPacket } from "mysql2";
export const create = (order: BasicOrder, callback: Function) => {
const queryString =
"INSERT INTO ticketOrder (id_ticket, id_user) VALUES (?, ?)";
db.query(
... |
import {Inject, Injectable} from '@angular/core';
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {Title} from '@angular/platform-browser';
import {DOCUMENT} from '@angular/common';
import {TranslateService} from '@ngx-translate/core';
import {filter, map, mergeMap, takeUntil} from 'rxjs/o... |
/* GENERATED FILE */
import * as React from "react";
import Svg, { Rect, Circle } from "react-native-svg";
import { IconProps } from '../lib'
function Record(props: IconProps) {
return <Svg viewBox="0 0 256 256" width={props.size} height={props.size}
fill={props.color} {...props}><Rect width={256} height={256} fill... |
export = function isIe9(ua?: string): boolean {
ua = ua || window.navigator.userAgent;
return ua.indexOf("MSIE 9") !== -1;
}; |
declare module 'url';
declare module 'faker';
declare module '@brandingbrand/react-native-leanplum'; |
import { Disposer } from "../utils";
import { getCursorAccessEventHandler } from "./internal/_onCursorAccess";
/**
* Event generated when a cursor is read (accessed).
*/
export interface CursorAccess {
cursor: any;
value: any;
}
/**
* Listener for cursor access events.
*/
export type CursorAccessListener = (e... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { ImmutableService } from '../shared/immutable.service';
import { OrderByPipe } from './order-by.pipe';
import { OrderByObjectPipe } from './order-by-object.pipe';
import { OrderByService } from './order-by.service';
@Ng... |
import { Observable } from 'rxjs';
import { concatMap } from '../../operator/concatMap';
(Observable as any).prototype.concatMap = concatMap;
declare module 'rxjs/internal/Observable' {
interface Observable<T> {
concatMap: typeof concatMap;
}
} |
import { Alert, FilterOptions } from '@notifi-network/notifi-core';
type HasFilterOptions = Pick<Alert, 'filterOptions'>;
const hasKey = <T, Key extends PropertyKey>(
obj: T,
key: Key,
): obj is T & Record<Key, unknown> => {
return Object.prototype.hasOwnProperty.call(obj, key);
};
const parseFilterOptions = (... |
/*
* (C) Copyright 2017-2022 OpenVidu (https://openvidu.io)
*
* 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 ap... |
import 'reflect-metadata';
import AppError from '@shared/errors/AppError';
import ResetPasswordService from './ResetPasswordService';
import FakeUsersRepository from '../repositories/fakes/FakeUsersRepository';
import FakeUserTokensRepository from '../repositories/fakes/FakeUserTokensRepository';
import FakeHashProvide... |
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/no-unused-vars */
import { Subscription } from '@Models';
async function disableSubscriptionMethod(subscription: Subscription) {}
export default disableSubscriptionMethod; |
import type { APIClient } from '@wireapp/api-client';
import type { CallConfigData } from '@wireapp/api-client/src/account/CallConfigData';
export declare class AccountService {
private readonly apiClient;
constructor(apiClient: APIClient);
getCallConfig(): Promise<CallConfigData>;
} |
import { expect } from 'chai';
import { randomFill } from 'crypto';
import { CompareFn } from 'src';
import { LinkedNode } from 'src/list';
import { linkedMergeSort } from 'src/list/utils';
describe('List.utils unit tests', function () {
const compareFn: CompareFn<number> = (a, b) => a - b;
const values = getR... |
import {NgModule} from '@angular/core';
import {MatIconModule} from '@angular/material/icon';
import {MatToolbarModule} from '@angular/material/toolbar';
import {ToolbarMultirowExample} from './toolbar-multirow/toolbar-multirow-example';
import {ToolbarOverviewExample} from './toolbar-overview/toolbar-overview-example'... |
import Benchmark = require("benchmark");
var suite = new Benchmark.Suite;
// add tests
suite.add('RegExp#test', function() {
/o/.test('Hello World!');
})
.add('String#indexOf', function() {
'Hello World!'.indexOf('o') > -1;
})
.add('String#match', function() {
!!'Hello World!'.match(/o/);
})
// add listeners
.o... |
import React, { useMemo } from 'react';
import { ReactComponent as BinanceChainWallet } from './Logos/BinanceChainWallet.svg';
import { ReactComponent as Ledger } from './Logos/Ledger.svg';
import { ReactComponent as MathWallet } from './Logos/MathWallet.svg';
import { ReactComponent as MetaMask } from './Logos/MetaMa... |
import * as authentication from "@feathersjs/authentication";
import processController from "../../hooks/process-controller";
// Don't remove this comment. It's needed to format import lines nicely.
const { authenticate } = authentication.hooks;
export default {
before: {
all: [authenticate("jwt")],
find: [... |
import VarStyleProvider from './StyleProvider.vue'
import type { VueConstructor } from 'vue'
import { formatStyleVars } from '../utils/elements'
export type StyleVars = Record<string, string>
const mountedVarKeys: string[] = []
function StyleProvider(styleVars: StyleVars | null = {}) {
mountedVarKeys.forEach((key)... |
import * as protoLoader from '@grpc/proto-loader';
import {
ChannelCredentials,
Client,
GrpcObject,
handleServerStreamingCall,
handleUnaryCall,
loadPackageDefinition,
ServiceDefinition,
} from 'grpc';
import { Observable } from 'rxjs';
export type ClientFactoryConstructor<T> = new (
address: string,
... |
import { SMSClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../SMSClient";
import { StartOnDemandReplicationRunRequest, StartOnDemandReplicationRunResponse } from "../models/models_0";
import {
deserializeAws_json1_1StartOnDemandReplicationRunCommand,
serializeAws_json1_1StartOnDemandReplication... |
import Heap from "./Heap";
export default class HeapMin<T> extends Heap<T> {
pairIsInCorrectOrder(firstElement, secondElement) {
return this.compare.lessOrEqualThan(firstElement, secondElement);
}
} |
import { Directive, Inject } from '@angular/core';
import { DOCUMENT } from "@angular/platform-browser";
import { Clipboard } from '@ionic-native/clipboard';
import { ToastController } from 'ionic-angular';
import { Logger } from '../../providers/logger/logger';
import { PlatformProvider } from '../../providers/platfor... |
import { Observable } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { SubscriptionLog } from '../../src/internal/testing/SubscriptionLog';
import { ColdObservable } from '../../src/internal/testing/ColdObservable';
import { HotObservable } from '../../src/internal/testing/HotObservable';
import { ob... |
import { SWFClient } from "./SWFClient";
import { CountClosedWorkflowExecutionsInput } from "./types/CountClosedWorkflowExecutionsInput";
import { CountClosedWorkflowExecutionsOutput } from "./types/CountClosedWorkflowExecutionsOutput";
import { CountOpenWorkflowExecutionsInput } from "./types/CountOpenWorkflowExecutio... |
import { StyleSheet } from "react-native";
export const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "#FFF",
position: "relative",
},
containerLogo: {
display: "flex",
alignItems: "center",
justifyContent: "center",
marginBottom: 30,
},
logo: {
width: ... |
import { NextPage } from 'next';
const Settings: NextPage = () => {
return (
<div className="settings-page">
<div className="container page">
<div className="row">
<div className="col-md-6 offset-md-3 col-xs-12">
<h1 className="text-xs-center">Your Settings</h1>
<... |
export interface Message {
id: string;
body: string;
type: string;
t: number;
notifyName: string;
from: string;
to: string;
author: string;
self: string;
ack: number;
invis: boolean;
isNewMsg: boolean;
star: boolean;
recvFresh: boolean;
interactiveAnnotations:... |
import PayoutException from "./PayoutException";
export class PayoutQueryException implements PayoutException {
public readonly message: string = "Failed to retrieve payout batch";
public readonly name: string = "BITPAY-PAYOUT-BATCH-GET";
public readonly code: number = 123;
public readonly stack: stri... |
import { LegacyWallet } from './legacy-wallet';
import * as bip39 from 'bip39';
import { BIP32Interface } from 'bip32';
import BlueElectrum from '../../blue_modules/BlueElectrum';
import { Transaction } from './types';
type AbstractHDWalletStatics = {
derivationPath?: string;
};
/**
* @deprecated
*/
export class ... |
import { EntityParameters } from '../queryParameters/EntityParameters';
import validateEntityParameters from './validateEntityParameters';
const VALID_EMBEDS: Readonly<Record<string, true>> = {
childNodes: true,
contributor: true,
parentNode: true,
primaryImage: true,
};
export const validateNodeParamet... |
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-form-elements',
templateUrl: './form-elements.component.html',
styleUrls: ['./form-elements.component.scss']
})
export class FormElementsComponent implements OnInit {
ishtml = true;
ists = false;
iscss = false;
ishtml2 = tru... |
import { Action } from '@ngrx/store';
import { KeyValue, NgrxFormControlId, ValidationErrors } from './state';
// NOTE: the explicit type declaration for the `TYPE` properties is required
// for the output declarations to properly use the literal string type instead
// of just `string`
export class SetValueAction<TVa... |
import {useEffect, VFC} from "react";
import {Outlet, useNavigate} from "react-router";
import {Link} from "react-router-dom";
import classNames from "classnames";
import {useTranslation} from "react-i18next";
import {Avatar} from "components/Avatar";
import {Portal} from "components/Portal";
import {useAppSelector} fr... |
import { useContext, createContext } from 'react'
import invariant from 'invariant'
const MapContext = createContext<google.maps.Map | null>(null)
export function useGoogleMap(): google.maps.Map | null {
invariant(!!useContext, 'useGoogleMap is React hook and requires React version 16.8+')
const map = useContext... |
import { EffectCallback, useEffect } from "react";
export const useOnMount = (effect: EffectCallback) => {
useEffect(effect, []); // eslint-disable-line react-hooks/exhaustive-deps
}; |
import { Directive, ViewContainerRef, TemplateRef, Input } from '@angular/core'
import { Store } from '@ngrx/store'
import { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy'
import { map } from 'rxjs/operators'
import get from 'lodash-es/get'
import { getSpringDataItems, Nullable } from 'ngx-mclabs-utils'
i... |
import { ComponentStory, ComponentMeta } from '@storybook/react'
import { MemoryRouter } from 'react-router-dom'
import { UserInfo } from './UserInfo'
export default {
title: 'frame/UserInfo',
component: UserInfo,
parameters: {
layout: 'fullscreen',
},
decorators: [
(Story) => (
<MemoryRouter>
... |
import { WeElement, h, tag } from 'omi'
import { tw, sheet } from 'omi-twind'
interface Props {
number: number
unit: string
describe: string
}
const tagName = 'simple-card'
declare global {
namespace JSX {
interface IntrinsicElements {
[tagName]: Omi.Props & Props
}
}
}
@tag(tagName)
export d... |
import { Component, OnInit } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { NbJSThemeOptions } from '@nebular/theme/services/js-themes/theme.options';
import { AnalyticsService } from '../../../@core/utils/analytics.service';
@Component({
selector: 'ngx-theme-switcher',
styleUrls: ... |
import { IdentityMetadataWrapper } from '@celo/contractkit/lib/identity'
import { IArg } from '@oclif/parser/lib/args'
import { cli } from 'cli-ux'
import { BaseCommand } from '../../base'
import { Args } from '../../utils/command'
import { displayMetadata } from '../../utils/identity'
export default class GetMetadata... |
import IFurniture from '../interfaces/IFurniture';
export const Furnitures: IFurniture[] = [
{
Name: '? Block',
Source: 'Fortune Cookie',
Price: 'NFS',
SalePrice: 210,
Theme: 'Hobby',
Style: 'Fancy',
Color: 'Orange/Brown'
},
{
Name: '1-Up Mushroom',
Source: 'Fortune Cookie',
Price: 'NFS',
Sale... |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Rule } from '@angular-devkit/schematics';
import { JSONFile } from '../../utility/json-file';
export defaul... |
import { AddOperator } from "../../src/operator/add";
import { LintResult } from "../../src/lint-result";
import { createOption } from "./functional-option.test";
function expectResult(result: LintResult[]) {
expect(result.length).toBe(1);
expect(result[0]).toMatchObject({
path: "test/file.txt",
... |
import React from 'react';
import { Page } from 'layouts/page';
export const Home = () => (
<Page
title="Home"
content="Welcome Home! This is some random content. It can be anything, but it's a text for now."
/>
); |
module siouxjs.ui {
"use strict";
export class Scale9Button extends Button {
private _objStateOn: Scale9ButtonState;
private _objStateDown: Scale9ButtonState;
private _objStateOver: Scale9ButtonState;
private _label: string;
private _textAlign: string;
... |
import * as React from 'react'
import Link from 'gatsby-link'
import Helmet from "react-helmet";
import { PostListViewItem } from "../components/ui/molecules/PostListViewItem";
declare const graphql: any;
export interface IIndexPageProps{
data: any;
}
export default class IndexPage extends React.Component<IIndex... |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
import { IEventNamePropertyMapping } from '../telemetry/index';
import { EventName } from './constants';
export type EditorLoadTelemetry = IEventNamePropertyMapping[EventName.EDITOR_LOAD];
export type Linter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.