repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
nayanika2/legend-studio | packages/legend-studio/src/models/metamodels/pure/model/packageableElements/domain/PrimitiveType.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/models/protocols/pure/v1/model/packageableElements/store/relational/model/V1_RelationalDataType.ts | <reponame>nayanika2/legend-studio
/**
* Copyright (c) 2020-present, <NAME>
*
* 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
*
* Unle... |
nayanika2/legend-studio | packages/legend-studio-preset-query-builder/src/stores/QueryBuilderLambdaBuilder.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/models/sdlc/models/configuration/ProjectConfiguration.ts | <filename>packages/legend-studio/src/models/sdlc/models/configuration/ProjectConfiguration.ts<gh_stars>1-10
/**
* Copyright (c) 2020-present, <NAME>
*
* 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 ... |
nayanika2/legend-studio | packages/legend-studio/src/models/protocols/pure/v1/engine/execution/V1_ExecutionResult.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/stores/__tests__/roundtrip/DiagramRoundtripTestData.ts | <reponame>nayanika2/legend-studio
/**
* Copyright (c) 2020-present, <NAME>
*
* 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
*
* Unle... |
nayanika2/legend-studio | packages/legend-studio/src/models/sdlc/models/workspace/Workspace.ts | <filename>packages/legend-studio/src/models/sdlc/models/workspace/Workspace.ts
/**
* Copyright (c) 2020-present, <NAME>
*
* 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://w... |
nayanika2/legend-studio | packages/legend-studio/src/utils/Logger.ts | <filename>packages/legend-studio/src/utils/Logger.ts
/**
* Copyright (c) 2020-present, <NAME>
*
* 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/LIC... |
nayanika2/legend-studio | packages/legend-studio-preset-query-builder/src/components/__tests__/QueryBuilder_TestFilterQueriesWithExists.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio-preset-dsl-text/src/stores/__tests__/DSLText_Roundtrip.test.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/stores/__tests__/buildGraph/GraphBuildFailure.test.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/models/metamodels/pure/model/packageableElements/domain/Package.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
nayanika2/legend-studio | packages/legend-studio/src/models/metamodels/pure/action/generation/ImportConfigurationDescription.ts | /**
* Copyright (c) 2020-present, <NAME>
*
* 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 a... |
sugarshin/rollup-plugin-assets-replace | src/index.ts | <reponame>sugarshin/rollup-plugin-assets-replace<filename>src/index.ts
import { createFilter } from '@rollup/pluginutils';
import type { OutputAsset, OutputChunk, Plugin } from 'rollup';
import type { FilterPattern } from '@rollup/pluginutils';
export type Options = {
include?: FilterPattern;
exclude?: FilterPatt... |
sugarshin/rollup-plugin-assets-replace | test/fixtures/bar.d.ts | import { Foo } from '@sugarshin/foo';
import { Bar } from '@sugarshin/bar';
export interface Buz {
foo: Foo;
bar: Bar;
dummy: 'aaa@sugarshin/foo';
dolor: string;
}
|
sugarshin/rollup-plugin-assets-replace | rollup.config.ts | import typescript from '@rollup/plugin-typescript';
const plugins = [typescript()];
export default [
{
input: 'src/index.ts',
output: {
file: 'lib/index.cjs.js',
format: 'cjs',
},
plugins,
},
{
input: 'src/index.ts',
output: {
file: 'lib/index.es.js',
format: 'es',
... |
sugarshin/rollup-plugin-assets-replace | test/index.ts | import fs from 'fs';
import path from 'path';
import test from 'ava';
import { SetRequired } from 'type-fest';
import type { NormalizedOutputOptions, OutputBundle, OutputAsset, PluginContext } from 'rollup';
import { assetsReplace, Options } from '../src';
type AssetsReplacePlugin = SetRequired<ReturnType<typeof asse... |
wikipathways/wp-super-search | csv-streamify.d.ts | <reponame>wikipathways/wp-super-search
declare interface CsvOptions {
objectMode: boolean,
delimiter: string
}
declare function csv(csvOptions: CsvOptions): NodeJS.ReadWriteStream;
declare module 'csv-streamify' {
export = csv;
}
|
wikipathways/wp-super-search | build/xlsx.d.ts | declare interface Utils {
sheet_to_json: (input: any) => any
}
//declare class ReactPivot extends React.Component<any, any> {}
declare module 'xlsx' {
export function read(data: string, read_opts?: any): any;
export function readFile(filename: string, read_opts?: any): any;
export const utils: Utils;
//export = an... |
wikipathways/wp-super-search | public/pivot-table-experiments/pivot-pivot.d.ts | declare class ReactPivot extends React.Component<any, any> {}
declare module 'pivot-pivot' {
export = ReactPivot;
}
|
wikipathways/wp-super-search | public/src/main.tsx | <filename>public/src/main.tsx
import {
defaults,
flatten,
forOwn,
keys,
isEmpty,
omit,
padStart,
toPairs,
union,
values
} from "lodash";
import * as React from "react";
import * as ReactDOM from "react-dom";
import { Observable } from "rxjs/Observable";
import { AjaxRequest } from "rxjs/observable/d... |
wikipathways/wp-super-search | build/src/build-hash.ts | <filename>build/src/build-hash.ts
/// <reference path="../../csv-streamify.d.ts" />
/// <reference path="../xlsx.d.ts" />
// tsc --project tsconfig.build-hash.json && node ./build-hash.js
declare global {
// Augment Node.js `global`
namespace NodeJS {
interface Global {
XMLHttpRequest: XMLHttpRequest;
... |
wikipathways/wp-super-search | public/src/sort.ts | export type Direction = "asc" | "desc";
export interface SortCriterion {
key: string;
direction: Direction;
}
export function singleSort(direction: Direction, a, b) {
if (a < b) {
return direction === "asc" ? 1 : -1;
} else if (a > b) {
return direction === "asc" ? -1 : 1;
} else {
return 0;
}
... |
wikipathways/wp-super-search | public/test/demo.tsx | <filename>public/test/demo.tsx<gh_stars>1-10
// NOTE: mock-server must be started before running this.
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import {values} from 'lodash';
import PathwayFinder from '../src/main';
// React says not to render directly into document.body, so here's a con... |
wikipathways/wp-super-search | public/src/App.tsx | <filename>public/src/App.tsx<gh_stars>1-10
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { connect, Provider } from 'react-redux';
import {store} from './store';
let App = ({ isPinging, ping }) => (
<div>
<h1>is pinging: {isPinging.toString()}</h1>
<button onClick={ping}>Start... |
wikipathways/wp-super-search | public/src/DataTable.tsx | <reponame>wikipathways/wp-super-search<gh_stars>1-10
import { defaults, forOwn } from "lodash";
import * as React from "react";
import * as ReactDOM from "react-dom";
// TODO should we use the theme provider here?
//import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
import StarterDataTable from "mater... |
wikipathways/wp-super-search | public/pivot-table-experiments/react-pivot.d.ts | declare class ReactPivot extends React.Component<any, any> {}
declare module 'react-pivot' {
export = ReactPivot;
//export default ReactPivot;
}
|
wikipathways/wp-super-search | public/src/TargetHighlighter.tsx | <reponame>wikipathways/wp-super-search
import { defaults, forOwn } from "lodash";
import * as React from "react";
import * as ReactDOM from "react-dom";
import Subheader from "material-ui/Subheader";
import RaisedButton from "material-ui/RaisedButton";
/**
* Show/hide targets of specified miRNAs.
*/
export class Tar... |
wikipathways/wp-super-search | public/src/store.ts | <filename>public/src/store.ts
import { createStore, applyMiddleware } from 'redux';
import { createEpicMiddleware } from 'redux-observable';
const PING = 'PING';
const PONG = 'PONG';
const pingEpic = action$ =>
action$.ofType(PING)
.delay(1000) // Asynchronously wait 1000ms then continue
.mapTo({ type: PONG... |
pouyakary/TypeScript | src/lib/es2020.intl.d.ts | <reponame>pouyakary/TypeScript
declare namespace Intl {
/**
* [BCP 47 language tag](http://tools.ietf.org/html/rfc5646) definition.
*
* [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
*
* [Wikipedia](https://en.wikipedia... |
pouyakary/TypeScript | tests/cases/fourslash/completionsSelfDeclaring2.ts | <gh_stars>1-10
/// <reference path="fourslash.ts" />
//// function f1<T>(x: T) {}
//// f1({ abc/*1*/ });
//// function f2<T extends { xyz: number }>(x: T) {}
//// f2({ x/*2*/ });
verify.completions({
marker: "1",
exact: completion.globalsPlus(["f1", "f2"])
});
verify.completions({
marker: "2",
exact: ["xyz... |
pouyakary/TypeScript | tests/cases/fourslash/completionEntryForUnionMethod.ts | ///<reference path="fourslash.ts" />
////var y: Array<string>|Array<number>;
////y.map/**/(
const text = "(method) Array<T>.map<unknown>(callbackfn: ((value: string, index: number, array: string[]) => unknown) & ((value: number, index: number, array: number[]) => unknown), thisArg: any): unknown[]";
const docum... |
pouyakary/TypeScript | tests/cases/fourslash/quickInfoAlias.ts | /// <reference path='fourslash.ts'/>
// @Filename: /a.ts
/////**
//// * Doc
//// * @tag Tag text
//// */
////export const x = 0;
// @Filename: /b.ts
////import { x } from "./a";
////x/*b*/;
// @Filename: /c.ts
/////**
//// * Doc 2
//// * @tag Tag text 2
//// */
////import {
//// /**
//// * Doc 3
//// * @t... |
pouyakary/TypeScript | src/webServer/webServer.ts | <reponame>pouyakary/TypeScript
/*@internal*/
namespace ts.server {
export interface HostWithWriteMessage {
writeMessage(s: any): void;
}
export interface WebHost extends HostWithWriteMessage {
readFile(path: string): string | undefined;
fileExists(path: string): boolean;
... |
pouyakary/TypeScript | tests/cases/conformance/jsdoc/declarations/jsDeclarationsParameterTagReusesInputNodeInEmit1.ts | // @allowJs: true
// @checkJs: true
// @target: es6
// @outDir: ./out
// @declaration: true
// @filename: base.js
class Base {
constructor() {}
}
const BaseFactory = () => {
return new Base();
};
BaseFactory.Base = Base;
module.exports = BaseFactory;
// @filename: file.js
/** @typedef {im... |
pouyakary/TypeScript | src/lib/esnext.intl.d.ts | declare namespace Intl {
type NumberFormatPartTypes = "compact" | "currency" | "decimal" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "fraction" | "group" | "infinity" | "integer" | "literal" | "minusSign" | "nan" | "plusSign" | "percentSign" | "unit" | "unknown";
interface NumberFormat... |
pouyakary/TypeScript | src/testRunner/unittests/tsserver/webServer.ts | namespace ts.projectSystem {
describe("unittests:: tsserver:: webServer", () => {
class TestWorkerSession extends server.WorkerSession {
constructor(host: server.ServerHost, webHost: server.HostWithWriteMessage, options: Partial<server.StartSessionOptions>, logger: server.Logger) {
... |
pouyakary/TypeScript | tests/cases/fourslash/completionListInObjectLiteral5.ts | <gh_stars>1-10
/// <reference path="fourslash.ts" />
////const o = 'something'
////const obj = {
//// prop: o/*1*/,
//// pro() {
//// const obj1 = {
//// p:{
//// s: {
//// h: {
//// hh: o/*2*/
//// },
//// ... |
alekitto/atlante-js | lib/Requester/Decorator/Authentication/HttpBasicAuthenticator.ts | import Request from '../../Request';
const encode = (() => {
if ('undefined' !== typeof Buffer) {
// Node.JS
return (str: string) => Buffer.from(str).toString('base64');
}
/* Base64 string to array encoding */
const uint6ToB64 = (n: number) => {
switch (true) {
case... |
alekitto/atlante-js | lib/Storage/CookieStorage.ts | import AbstractStorage from './AbstractStorage';
const getCookie = (key: string) => {
const name = key + '=';
const decodedCookie = decodeURIComponent(document.cookie);
const ca = decodedCookie.split(';')
.map(str => str.trim());
for (const c of ca) {
if (0 === c.indexOf(name)) {
... |
alekitto/atlante-js | index.ts | /// <reference path="lib/Exception/AbstractException.ts" />
/// <reference path="lib/Exception/AccessDeniedException.ts" />
/// <reference path="lib/Exception/BadRequestException.ts" />
/// <reference path="lib/Exception/InvalidRequestException.ts" />
/// <reference path="lib/Exception/NotFoundException.ts" />
/// <ref... |
alekitto/atlante-js | lib/Requester/Response/AbstractResponse.ts | import IResponse, { ResponseInterface } from './ResponseInterface';
import Headers from '../Headers';
export default
abstract class AbstractResponse extends implementationOf(IResponse) implements ResponseInterface {
constructor(protected statusCode: number, protected headers: Headers, protected data: unknown) {
... |
alekitto/atlante-js | lib/Requester/Decorator/Authentication/OpenID/ServerConfiguration.ts | <reponame>alekitto/atlante-js
export interface ServerConfigurationProps {
issuer: string;
authorization_endpoint: string;
token_endpoint: string;
end_session_endpoint: string;
userinfo_endpoint: string;
jwks_uri: string;
}
export default class ServerConfiguration {
public readonly issuer: s... |
alekitto/atlante-js | lib/Exception/AccessDeniedException.ts | <filename>lib/Exception/AccessDeniedException.ts
import AbstractException from './AbstractException';
import AccessDeniedResponse from '../Requester/Response/AccessDeniedResponse';
export default
class AccessDeniedException extends AbstractException {
constructor(response?: AccessDeniedResponse) {
super(re... |
alekitto/atlante-js | lib/Storage/Marshaller/MarshallerInterface.ts | <gh_stars>1-10
export interface MarshallerInterface {
}
export class MarshallerInterface {
/**
* Serializes a value into a string.
*/
// @ts-ignore
marshall(value: any): string { }
/**
* Converts a serialized value into its original representation.
*/
unmarshall(value: string):... |
alekitto/atlante-js | integrations/angular/requester.ts | <filename>integrations/angular/requester.ts<gh_stars>0
import { HttpClient, HttpErrorResponse, HttpEvent, HttpEventType, HttpHeaders, HttpRequest } from '@angular/common/http';
import { Inject, Injectable } from '@angular/core';
import { RequesterInterface } from '../../lib/Requester/RequesterInterface';
import { Respo... |
alekitto/atlante-js | lib/Requester/Response/Response.ts | <reponame>alekitto/atlante-js
import AbstractResponse from './AbstractResponse';
export default class Response extends AbstractResponse {
}
|
alekitto/atlante-js | lib/Exception/AbstractException.ts | import { ResponseInterface } from '../Requester/Response/ResponseInterface';
export default
class AbstractException extends Error {
private readonly _response: ResponseInterface;
/**
* Constructor.
*/
constructor(response: ResponseInterface | undefined, message?: string) {
super(message ... |
alekitto/atlante-js | lib/Exception/InvalidRequestException.ts | import AbstractException from './AbstractException';
import InvalidResponse from '../Requester/Response/InvalidResponse';
export default
class InvalidRequestException extends AbstractException {
constructor(response?: InvalidResponse) {
super(response);
}
get response(): InvalidResponse {
... |
alekitto/atlante-js | lib/Exception/BadRequestException.ts | import AbstractException from './AbstractException';
import BadResponse from '../Requester/Response/BadResponse';
import BadResponsePropertyTree from '../Requester/Response/BadResponsePropertyTree';
export default
class BadRequestException extends AbstractException {
constructor(response?: BadResponse) {
s... |
alekitto/atlante-js | lib/Utils/ArrayUtils.d.ts | declare class ArrayUtils {
/**
* Recursively converts all the keys to camel case.
*/
static toCamelCaseKeys<T = any>(input: T[]): T[];
static toCamelCaseKeys<T = any>(input: { [key: string]: T }): { [key: string]: T };
/**
* Recursively converts all the keys to snake case.
*/
st... |
alekitto/atlante-js | lib/Http/ClientInterface.ts | import Headers from '../Requester/Headers';
import { ResponseInterface } from '../Requester/Response/ResponseInterface';
export interface ClientInterface {}
export class ClientInterface {
/**
* Performs a request to the API service using the given method.
*
* Request data should be either a string, ... |
alekitto/atlante-js | lib/Requester/Decorator/UrlDecorator.ts | <reponame>alekitto/atlante-js
import Decorator, { DecoratorInterface } from './DecoratorInterface';
import Request from '../Request';
export default
class UrlDecorator extends implementationOf(Decorator) implements DecoratorInterface {
private readonly _baseUrl: string;
/**
* Constructor.
*/
con... |
alekitto/atlante-js | lib/Requester/Request.ts | <reponame>alekitto/atlante-js<gh_stars>1-10
import Headers from './Headers';
import HttpMessage from './HttpMessage';
export default interface Request<T = any> extends HttpMessage {
readonly method: string;
readonly url: string;
readonly body: T | undefined;
}
export const createRequest = <T = any>(
m... |
alekitto/atlante-js | lib/Storage/Item.ts | import Interface, { ItemInterface } from './ItemInterface';
export default
class Item extends implementationOf(Interface) implements ItemInterface {
private readonly _key: string;
private _value: any;
private readonly _isHit: boolean;
private _expiry: number;
private readonly _defaultLifetime: unde... |
alekitto/atlante-js | lib/Requester/WebRequester.ts | <gh_stars>0
import Requester, { RequesterInterface } from './RequesterInterface';
import { ResponseFactoryInterface } from './Response/ResponseFactoryInterface';
import { ResponseInterface } from './Response/ResponseInterface';
import XhrResponseFactory from './Response/XhrResponseFactory';
export default
class WebReq... |
alekitto/atlante-js | lib/Storage/ItemInterface.ts | /**
* ItemInterface defines an interface for interacting with objects inside a storage.
*
* Each Item object MUST be associated with a specific key, which can be set
* according to the implementing system and is typically passed by the
* ItemInterface object.
*
* The ItemInterface object encapsulates the storage... |
alekitto/atlante-js | lib/Storage/InMemoryStorage.ts | import Storage, { StorageInterface } from './StorageInterface';
import Item from './Item';
import { ItemInterface } from './ItemInterface';
import JSONMarshaller from './Marshaller/JSONMarshaller';
import { MarshallerInterface } from './Marshaller/MarshallerInterface';
export default
class InMemoryStorage extends impl... |
alekitto/atlante-js | lib/Storage/ProvidedTokenStorage.ts | import AbstractStorage from './AbstractStorage';
import NullMarshaller from './Marshaller/NullMarshaller';
export default
class ProvidedTokenStorage extends AbstractStorage {
private _accessToken?: string;
private _refreshToken?: string;
/**
* Constructor.
*/
constructor(accessToken?: string... |
alekitto/atlante-js | lib/Requester/Decorator/BodyConverterDecorator.ts | import Decorator, { DecoratorInterface } from './DecoratorInterface';
import Request from '../Request';
const isBlob = 'undefined' !== typeof Blob ? v => v instanceof Blob : () => false;
export default
class BodyConverterDecorator extends implementationOf(Decorator) implements DecoratorInterface {
/**
* Conv... |
alekitto/atlante-js | lib/Requester/Response/InvalidResponse.ts | import AbstractResponse from './AbstractResponse';
export default class InvalidResponse extends AbstractResponse {
}
|
alekitto/atlante-js | lib/Requester/Response/BadResponse.ts | import BadResponsePropertyTree from './BadResponsePropertyTree';
import Headers from '../Headers';
import InvalidResponse from './InvalidResponse';
export default class BadResponse extends InvalidResponse {
public static readonly HTTP_STATUS = 400;
protected data: BadResponsePropertyTree;
constructor(head... |
alekitto/atlante-js | lib/Requester/Header/BaseAccept.ts | import '@jymfony/util/lib/String/trim';
import ArrayUtils from '../../Utils/ArrayUtils';
export default
class BaseAccept {
protected _type: string;
private readonly _quality: number;
private readonly _value: string;
private _normalized: string;
private readonly _parameters: Record<string, string>;... |
alekitto/atlante-js | lib/Storage/WebLocalStorage.ts | import AbstractStorage from './AbstractStorage';
export default
class WebLocalStorage extends AbstractStorage {
/**
* @inheritdoc
*/
async hasItem(key: string): Promise<boolean> {
let item;
try {
item = localStorage.getItem(key);
} catch (e) {
return fa... |
alekitto/atlante-js | lib/Requester/Response/AbstractResponseFactory.ts | <filename>lib/Requester/Response/AbstractResponseFactory.ts
import IResponseFactory, { ResponseFactoryInterface } from './ResponseFactoryInterface';
import AccessDeniedResponse from './AccessDeniedResponse';
import BadResponse from './BadResponse';
import Headers from '../Headers';
import InvalidResponse from './Invali... |
alekitto/atlante-js | lib/Requester/Decorator/Authentication/OAuth/TokenPasswordAuthenticator.ts | import ClientTokenAuthenticator, { ClientTokenAuthenticatorConfiguration } from './ClientTokenAuthenticator';
import InvalidResponse from '../../../Response/InvalidResponse';
import NoTokenAvailableException from '../../../../Exception/NoTokenAvailableException';
import { RequesterInterface } from '../../../RequesterIn... |
alekitto/atlante-js | lib/Storage/AbstractStorage.ts | <gh_stars>1-10
import Storage, { StorageInterface } from './StorageInterface';
import Item from './Item';
import { ItemInterface } from './ItemInterface';
import JSONMarshaller from './Marshaller/JSONMarshaller';
import { MarshallerInterface } from './Marshaller/MarshallerInterface';
export default
abstract class Abst... |
alekitto/atlante-js | lib/Requester/Decorator/VersionSetterDecorator.ts | <gh_stars>1-10
import Decorator, { DecoratorInterface } from './DecoratorInterface';
import Accept from '../Header/Accept';
import Request from '../Request';
export default
class VersionSetterDecorator extends implementationOf(Decorator) implements DecoratorInterface {
private readonly _version: string;
/**
... |
alekitto/atlante-js | lib/Exception/NotFoundException.ts | import AbstractException from './AbstractException';
import NotFoundResponse from '../Requester/Response/NotFoundResponse';
export default
class NotFoundException extends AbstractException {
constructor(response?: NotFoundResponse) {
super(response);
}
get response(): NotFoundResponse {
re... |
alekitto/atlante-js | integrations/angular/public-api.ts | export * from './atlante.module';
export * from './requester';
export * from './response-factory';
|
alekitto/atlante-js | lib/Requester/Header/Accept.ts | import BaseAccept from './BaseAccept';
export default
class Accept extends BaseAccept {
private readonly _basePart: string;
private readonly _subPart: string;
/**
* Constructor.
*/
constructor(value: string) {
super(value);
if ('*' === this._type) {
this._type = ... |
alekitto/atlante-js | lib/Http/Client.ts | import Interface, { ClientInterface } from './ClientInterface';
import AccessDeniedException from '../Exception/AccessDeniedException';
import AccessDeniedResponse from '../Requester/Response/AccessDeniedResponse';
import BadRequestException from '../Exception/BadRequestException';
import BadResponse from '../Requester... |
alekitto/atlante-js | lib/Storage/Marshaller/NullMarshaller.ts | <gh_stars>1-10
import Marshaller, { MarshallerInterface } from './MarshallerInterface';
export default
class NullMarshaller extends implementationOf(Marshaller) implements MarshallerInterface {
/**
* @inheritdoc
*/
marshall(value: any): string {
return value.toString();
}
/**
* ... |
alekitto/atlante-js | lib/Requester/HttpMessage.ts | import Headers from './Headers';
export default
interface HttpMessage<T = any> {
readonly headers: Headers;
}
|
alekitto/atlante-js | lib/Requester/Response/ResponseInterface.ts | <filename>lib/Requester/Response/ResponseInterface.ts
import Headers from '../Headers';
export interface ResponseInterface {}
export class ResponseInterface {
/**
* Returns the API response content.
*/
getData<T>(): T;
// @ts-ignore
getData(): unknown[] | Record<string, unknown> | string { }
... |
alekitto/atlante-js | lib/Requester/Decorator/DecoratorInterface.ts | import Request from '../Request';
export class DecoratorInterface {
/**
* Decorates the request object adding/removing headers,
* authenticating the request, etc.
*/
// @ts-ignore
decorate<T = any>(request: Request<T>): Request<T> | Promise<Request<T>> { }
}
export interface DecoratorInterf... |
alekitto/atlante-js | lib/Requester/Headers.ts | <reponame>alekitto/atlante-js
import Accept from './Header/Accept';
import BaseAccept from './Header/BaseAccept';
export default
class Headers {
private _headers: Record<string, (string | Accept)[]> = {};
private _headersName: Record<string, string> = {};
/**
* Constructor.
*/
constructor(he... |
alekitto/atlante-js | lib/Requester/Response/XhrResponseFactory.ts | <filename>lib/Requester/Response/XhrResponseFactory.ts
import AbstractResponseFactory from './AbstractResponseFactory';
import Headers from '../Headers';
import { ResponseInterface } from './ResponseInterface';
export default
class XhrResponseFactory extends AbstractResponseFactory {
fromResponse(response: XMLHttp... |
alekitto/atlante-js | lib/Requester/Response/BadResponsePropertyTree.ts | /**
* @final
*/
export default class BadResponsePropertyTree {
private name: string;
private errors: string[] = [];
private children: BadResponsePropertyTree[] = [];
static parse(content: Record<string, any> | string): BadResponsePropertyTree {
const obj = new BadResponsePropertyTree();
... |
alekitto/atlante-js | lib/Requester/Response/ResponseFactoryInterface.ts | import { ResponseInterface } from './ResponseInterface';
export interface ResponseFactoryInterface {}
export class ResponseFactoryInterface {
// @ts-ignore
fromResponse(response: any): ResponseInterface { }
}
export default getInterface(ResponseFactoryInterface);
|
alekitto/atlante-js | lib/Storage/ChainStorage.ts | <reponame>alekitto/atlante-js
import Storage, { StorageInterface } from './StorageInterface';
import { ItemInterface } from './ItemInterface';
export default
class ChainStorage extends implementationOf(Storage) implements StorageInterface {
private readonly _storages: StorageInterface[];
/**
* Constructo... |
alekitto/atlante-js | lib/Requester/Response/NotFoundResponse.ts | import Headers from '../Headers';
import InvalidResponse from './InvalidResponse';
export default class NotFoundResponse extends InvalidResponse {
public static readonly HTTP_STATUS = 404;
constructor(headers: Headers, data: unknown) {
super(NotFoundResponse.HTTP_STATUS, headers, data);
}
}
|
alekitto/atlante-js | lib/Exception/NoTokenAvailableException.ts | <gh_stars>0
export default
class NoTokenAvailableException extends Error {
}
|
alekitto/atlante-js | lib/Requester/Response/AccessDeniedResponse.ts | <reponame>alekitto/atlante-js
import Headers from '../Headers';
import InvalidResponse from './InvalidResponse';
export default class AccessDeniedResponse extends InvalidResponse {
public static readonly HTTP_STATUS = 403;
constructor(headers: Headers, data: unknown) {
super(AccessDeniedResponse.HTTP_... |
alekitto/atlante-js | lib/Requester/RequesterInterface.ts | import { ResponseInterface } from './Response/ResponseInterface';
export interface RequesterInterface { }
export class RequesterInterface {
/**
* Performs a request.
* Returns a response with parsed data, if no error is present.
*/
// @ts-ignore
request(method: string, path: string, headers?... |
alekitto/atlante-js | lib/Storage/Marshaller/JSONMarshaller.ts | import Marshaller, { MarshallerInterface } from './MarshallerInterface';
export default
class JSONMarshaller extends implementationOf(Marshaller) implements MarshallerInterface {
/**
* @inheritdoc
*/
marshall(value: any): string {
return JSON.stringify(value);
}
/**
* @inheritdo... |
alekitto/atlante-js | lib/Requester/Decorator/Authentication/OAuth/TokenResponseDataInterface.ts | <reponame>alekitto/atlante-js
export interface TokenResponseDataInterface {
access_token: string;
expires_in: number;
refresh_token?: string;
id_token?: string;
}
|
good-monday/interview-ts | src/chart.ts | <gh_stars>0
import * as asciichart from 'asciichart'
import chalk from 'chalk'
type Lines = Record<string, number[]>
export default function chart(lines: Lines) {
const legends = Object.keys(lines)
const values = Object.values(lines)
const legendColors = [chalk.bgBlue, chalk.bgGreen, chalk.bgYellow, ... |
fangqk1991/node-model | tests/ModelMainEx.ts | import { FCModel } from '../src'
import ModelSubEx from './ModelSubEx'
export default class ModelMainEx extends FCModel {
public xyy: any
public xxxYYY: any
public subObj: any
public subItems: any
public noGiven: any
fc_propertyMapper(): { [p: string]: string } {
return {
xyy: 'xyy',
xxxYY... |
fangqk1991/node-model | tests/FCModel.test.ts | import ModelMainEx from './ModelMainEx'
import ModelSubEx from './ModelSubEx'
import * as assert from 'assert'
import { DiffMapper } from '@agora-lab/tools'
const getTestData = () => {
return {
xyy: 1,
xxx_yyy: 'hehehe',
xxx: 'ttt',
sub_obj: {
name: 'Sub - Obj',
},
sub_items: [{ name: '... |
fangqk1991/node-model | src/FCModel.ts | <reponame>fangqk1991/node-model
interface MapProtocol {
[p: string]: any
}
export class FCModel implements MapProtocol {
/**
* @description It will be executed in constructor
*/
fc_defaultInit(): void {}
fc_afterGenerate(_data: MapProtocol = {}): void {}
/**
* @description Mapping table for (class... |
fangqk1991/node-model | tests/ModelSubEx.ts | import { FCModel } from '../src'
export default class ModelSubEx extends FCModel {
public name: any
public nickName: any
fc_propertyMapper(): { [p: string]: string } {
return {
name: 'name',
nickName: 'nick_name',
}
}
}
|
fangqk1991/node-model | src/index.ts | <reponame>fangqk1991/node-model
export * from './FCModel'
|
LocusSolutions/coverage-action | src/CoverageSummary.ts | <gh_stars>0
/* eslint-disable @typescript-eslint/no-explicit-any */
interface ICodeCoverageSummary {
assemblies: number
assembliesDelta: number
classes: number
classesDelta: number
files: number
filesDelta: number
coveredlines: number
coveredlinesDelta: number
uncoveredlines: number
uncoveredlines... |
LocusSolutions/coverage-action | src/main.ts | import * as github from '@actions/github'
import * as core from '@actions/core'
import * as fs from 'fs'
import {CreateCoverageSummary, GetCoverageSummary} from './CoverageSummary'
async function run(): Promise<void> {
try {
let targetBranchRunOutput = null
let currentBranchRunOutput = null
/*
Setup... |
LocusSolutions/coverage-action | __tests__/main.test.ts | <reponame>LocusSolutions/coverage-action
import {GetCoverageSummary} from '../src/CoverageSummary'
import * as fs from 'fs'
test('get code coverage', async () => {
/*
const mainBranchRun = fs.readFileSync('MainRun.json', 'utf-8')
const mainBranchRunOutput = JSON.parse(mainBranchRun.trim())
const currentRun = ... |
damingerdai/qhttp | src/http.ts | <gh_stars>0
import request from 'request';
import { Model, Method } from './model';
/**
* http服务接口
*/
interface IHttpService {
/**
* 发送get请求
* @param url 请求连接
* @param data 数据
* @param header 请求头
*/
get<T>(url: string, data: Model<string>, header: Model<string>): Promise<T>;
/*... |
damingerdai/qhttp | src/model.ts | <reponame>damingerdai/qhttp<filename>src/model.ts
export interface Model<T> {
[key: string]: T;
}
export type Method = 'get' | 'post' | 'put' | 'delete'; |
Emeshka/graphytica | src/app/switch-true-false/switch-true-false.component.ts | import { Component, OnInit, Output, EventEmitter, Input, SimpleChanges } from '@angular/core';
@Component({
selector: 'switch-true-false',
templateUrl: './switch-true-false.component.html',
styleUrls: ['./switch-true-false.component.css']
})
export class SwitchTrueFalseComponent implements OnInit {
constructo... |
Emeshka/graphytica | src/app/icon-button/icon-button.component.ts | import { Component, Input } from '@angular/core';
@Component({
selector: 'app-icon-button',
templateUrl: './icon-button.component.html',
styleUrls: ['./icon-button.component.css']
})
export class IconButtonComponent {
constructor() { }
@Input() title: string;
@Input() iconSrc: string;
@Input() active: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.