repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
joscha/fast-glob
src/utils/pattern.spec.ts
import * as assert from 'assert'; import { Pattern } from '../types'; import * as util from './pattern'; describe('Utils → Pattern', () => { describe('.isStaticPattern', () => { it('should return true for static pattern', () => { const actual = util.isStaticPattern('dir'); assert.ok(actual); }); it('sh...
joscha/fast-glob
src/providers/async.ts
import { Task } from '../managers/tasks'; import ReaderStream from '../readers/stream'; import { Entry, EntryItem, ReaderOptions } from '../types'; import Provider from './provider'; export default class ProviderAsync extends Provider<Promise<EntryItem[]>> { protected _reader: ReaderStream = new ReaderStream(this._se...
joscha/fast-glob
src/utils/stream.ts
import * as merge2 from 'merge2'; export function merge(streams: NodeJS.ReadableStream[]): NodeJS.ReadableStream { const mergedStream = merge2(streams); streams.forEach((stream) => { stream.once('error', (error) => mergedStream.emit('error', error)); }); return mergedStream; }
andreubotella/swc
crates/swc/tests/fixture/issue-3073/2/output/index.ts
var Foo; (function(Foo1) { var ref; ref = { a: 1, b: 2 }, Foo1.A = ref.a, Foo1.B = ref.b, ref; })(Foo || (Foo = { }));
ksenonadv/ragemp-types
packages/client/game/cam.d.ts
<filename>packages/client/game/cam.d.ts declare interface GameCamLegacy { renderScriptCams(render: boolean, ease: boolean, easeTime: number, p3: boolean, p4: boolean, p5: number): void; createCam(camName: string, p1: boolean): number; createCamWithParams( camName: string, posX: number, posY: number, posZ: nu...
ksenonadv/ragemp-types
packages/client/game/graphics.d.ts
declare interface GetActiveScreenResolutionResult { x: number; y: number; } declare interface GetStatusOfLoadMissionCreatorPhotoResult { p0: number; result: number; } declare interface GetScriptGfxPositionResult { calculatedX: number; calculatedY: number; } declare interface GetScreenResolutionResult { x: num...
ksenonadv/ragemp-types
packages/server/index.d.ts
<gh_stars>0 /// <reference path="enums.d.ts" /> /// <reference path="./hashes/ped_hashes.d.ts" /> /// <reference path="./hashes/vehicle_hashes.d.ts" /> /// <reference path="./hashes/weapon_hashes.d.ts" /> declare type HashOrNumberOrString<T> = T | number | string; declare type HashOrString<T> = T | string; declare typ...
ksenonadv/ragemp-types
packages/server/enums.d.ts
<reponame>ksenonadv/ragemp-types declare namespace RageEnums { const enum ClothesComponent { HEAD = 0, BEARD = 1, HAIR = 2, TORSO = 3, LEGS = 4, HANDS = 5, FOOT = 6, NONE = 7, ACCESSORIES_1 = 8, ACCESSORIES_2 = 9, MASK = 10, DECALS = 11, AUXILIARY = 12 } const enum ColshapeType { CIRCLE ...
ksenonadv/ragemp-types
packages/cef/index.d.ts
interface Mp { trigger(name: string, ...args: any[]): void; } interface Window { mp: Mp; } declare var mp: Mp;
devrajsinghrawat/sidetree.js
packages/wallet/src/operations/LocalSigner.ts
<reponame>devrajsinghrawat/sidetree.js<filename>packages/wallet/src/operations/LocalSigner.ts import { ISigner } from '@decentralized-identity/ion-sdk'; import { OperationKeyType } from './types'; import InputValidator from './InputValidator'; import { sign } from '@sidetree/crypto'; type PrivateKeyJwk = any; /** ...
devrajsinghrawat/sidetree.js
packages/core/src/test/TransactionProcessor.spec.ts
/* * The code in this file originated from * @see https://github.com/decentralized-identity/sidetree * For the list of changes that was made to the original code * @see https://github.com/transmute-industries/sidetree.js/blob/main/reference-implementation-changes.md * * Copyright 2020 - Transmute Industries Inc. ...
devrajsinghrawat/sidetree.js
packages/wallet/src/operations/__tests__/ion/SidetreeWallet.Operations.spec.ts
<reponame>devrajsinghrawat/sidetree.js<filename>packages/wallet/src/operations/__tests__/ion/SidetreeWallet.Operations.spec.ts // Based on: // https://github.com/decentralized-identity/ion-sdk/blob/main/tests/operations.spec.ts import { OperationType, SidetreeDocumentModel } from '../../types'; import LocalSigner from...
devrajsinghrawat/sidetree.js
packages/db/src/MongoDbBase.ts
<filename>packages/db/src/MongoDbBase.ts /* * The code in this file originated from * @see https://github.com/decentralized-identity/sidetree * For the list of changes that was made to the original code * @see https://github.com/transmute-industries/sidetree.js/blob/main/reference-implementation-changes.md * * Co...
devrajsinghrawat/sidetree.js
packages/core/src/Resolver.ts
/* * The code in this file originated from * @see https://github.com/decentralized-identity/sidetree * For the list of changes that was made to the original code * @see https://github.com/transmute-industries/sidetree.js/blob/main/reference-implementation-changes.md * * Copyright 2020 - Transmute Industries Inc. ...
devrajsinghrawat/sidetree.js
packages/core/src/test/Observer.spec.ts
/* * The code in this file originated from * @see https://github.com/decentralized-identity/sidetree * For the list of changes that was made to the original code * @see https://github.com/transmute-industries/sidetree.js/blob/main/reference-implementation-changes.md * * Copyright 2020 - Transmute Industries Inc. ...
devrajsinghrawat/sidetree.js
packages/wallet/src/operations/index.ts
<reponame>devrajsinghrawat/sidetree.js export * from './create'; export * from './update'; export * from './recover'; export * from './deactivate'; export * from './createLongFormDid';
devrajsinghrawat/sidetree.js
packages/wallet/src/functions/sidetreeEncoding.ts
/* * Copyright 2020 - Transmute Industries Inc. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agr...
devrajsinghrawat/sidetree.js
packages/wallet/src/operations/LocalSigner.test.ts
import LocalSigner from './LocalSigner'; it('can sign with ES256K', async () => { const signer = LocalSigner.create( require('./__tests__/ion/vectors/inputs/jwkEs256k1Private.json') ); const signature = await signer.sign({}, { hello: 'world' }); expect(signature).toBe( '<KEY>' ); });
devrajsinghrawat/sidetree.js
packages/wallet/src/functions/getRecoverOperationForProfile.ts
<filename>packages/wallet/src/functions/getRecoverOperationForProfile.ts /* * Copyright 2020 - Transmute Industries Inc. * 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.ap...
devrajsinghrawat/sidetree.js
packages/did-method/src/DidMethod.ts
/* * Copyright 2020 - Transmute Industries Inc. * * 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 ...
hungcat/boardgameLocal
src/common/models.ts
import * as getUUID from "uuid/v4"; export class ItemBase { _id: string; get itemType(): string { return this.constructor.name; } offset: { top: number, left: number }; constructor() { this._id = getUUID(); this.offset = { top: 0, left: 0 }; } equals(item: ItemBase) { return this._id ==...
hungcat/boardgameLocal
src/common/config.ts
const port: string = '3000'; export module ClientConfig { export const wsHost: string = 'ws://localhost:' + port + '/ws'; }; export module ServerConfig { export const serverPort: string = port; export const isHTTPS: boolean = false; export const httpsKey: string = ''; export const httpsCert: string = ''; };...
hungcat/boardgameLocal
src/client/src/app/shared/dynamic-component.service.ts
<gh_stars>0 import { Injectable, ViewContainerRef, ComponentFactoryResolver, Component, ComponentRef, OnInit, OnDestroy, Output, EventEmitter, ElementRef, } from '@angular/core'; declare var $: any; @Component({}) export class DynamicComponentBase implements OnInit, OnDestroy { @Output() onini...
hungcat/boardgameLocal
src/server/shared/websocket-adapter.ts
import * as http from "http"; import * as WebSocket from "ws"; import * as getUUID from "uuid/v4"; import { WSApp } from './websocket-app' function WrapWebSocketAdapter(apps: Array<WSApp>) { return new WebSocketAdapter(apps).exportOnConnection(); } interface WSAOptions { checkBeforeBroadcast?: boolean; b...
hungcat/boardgameLocal
src/client/src/app/board/items/area-generator/area-generator.component.ts
import { Component, OnInit, ViewContainerRef, ElementRef, } from '@angular/core'; import { AreaComponent } from "../area/area.component"; import { DynamicComponentBase, DynamicComponentService } from "../../../shared/dynamic-component.service"; @Component({ selector: 'app-area-generator', templateUrl: '...
hungcat/boardgameLocal
src/common/utils.ts
const uuidPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; export function isUUID(id: string) { return uuidPattern.test(id); }
hungcat/boardgameLocal
src/client/src/config.ts
export { ClientConfig } from '../../common/config';
hungcat/boardgameLocal
src/client/src/app/board/items/card/card.component.ts
import { Component, Input, Output, EventEmitter, HostBinding, HostListener, ElementRef, ChangeDetectorRef } from '@angular/core'; import { DynamicComponentBase } from "../../../shared/dynamic-component.service"; import { makeDraggable, updateDraggableZIndex } from "../../../shared/utils"; import { Card } from "../../.....
hungcat/boardgameLocal
src/client/src/app/board/items/deck/deck.component.ts
import { Component, Input, ElementRef, HostBinding, HostListener, NgZone, ChangeDetectorRef } from '@angular/core'; import { DynamicComponentBase } from "../../../shared/dynamic-component.service"; import { makeDraggable, makeDroppable } from "../../../shared/utils"; import { Card, Deck } from "../../../shared/models";...
hungcat/boardgameLocal
src/server/routes/apis/index.ts
import { Router, Request, Response } from "express"; const router: Router = Router(); /* GET users listing. */ router.get('/', function(req: Request, res: Response, next) { res.send('respond with a resource'); }); export = router;
hungcat/boardgameLocal
src/client/src/app/shared/models.ts
export * from '../../../../common/models'
hungcat/boardgameLocal
src/client/src/app/user-registration/user-registration.component.ts
<reponame>hungcat/boardgameLocal import { Component, OnInit, Input } from '@angular/core'; import { Router } from '@angular/router'; import { WebSocketService } from "../shared/websocket.service"; @Component({ selector: 'user-registration', templateUrl: './user-registration.component.html', styleUrls: ['./user-r...
hungcat/boardgameLocal
src/server/shared/websocket-app.ts
<filename>src/server/shared/websocket-app.ts<gh_stars>0 import * as http from "http"; import * as WebSocket from "ws"; import { WebSocketAdapter } from "./websocket-adapter"; interface WSApp { onconnection: (wsa: WebSocketAdapter, ws: WebSocket, req: http.IncomingMessage) => void; onmessage: (wsa: WebSocketAd...
hungcat/boardgameLocal
src/server/config.ts
export { ServerConfig } from '../common/config';
hungcat/boardgameLocal
src/client/src/app/board/items/player/player.component.ts
import { Component, OnInit, ElementRef, ViewContainerRef, HostBinding, NgZone} from '@angular/core'; import { DynamicComponentBase, DynamicComponentService } from "../../../shared/dynamic-component.service"; import { makeDraggable, makeDroppable } from "../../../shared/utils"; import { AreaComponent } from "../area/are...
hungcat/boardgameLocal
src/server/app.ts
<filename>src/server/app.ts import * as express from "express"; import * as path from "path"; import * as logger from "morgan"; import * as compression from "compression"; import * as cookieParser from "cookie-parser"; import { json, urlencoded } from "body-parser"; import * as expressWs from "express-ws"; import * as...
hungcat/boardgameLocal
src/client/src/app/board/items/area/area.component.ts
<filename>src/client/src/app/board/items/area/area.component.ts import { Component, OnInit, ElementRef, ViewChildren, QueryList, NgZone, HostBinding } from '@angular/core'; import { DynamicComponentBase } from "../../../shared/dynamic-component.service"; import { makeDraggable, makeDroppable } from "../../../shared/uti...
hungcat/boardgameLocal
src/client/src/app/shared/websocket.service.ts
import { Injectable, Inject, Optional } from '@angular/core'; export const WSHOST = 'wsHost'; const defaultURL = 'ws://localhost:3000/ws'; @Injectable() export class WebSocketService { private url: string; private _ws: WebSocket; private reconnectCount: number = 0; private autoReconnect: boolean = true; pr...
hungcat/boardgameLocal
src/server/shared/board.ts
import * as http from "http"; import * as WebSocket from "ws"; import * as getUUID from "uuid/v4"; import { WSApp } from "./websocket-app"; import { WebSocketAdapter } from "./websocket-adapter"; import { Player } from "../../common/models"; import { isUUID } from "../../common/utils"; class UserInfo { private _id:...
hungcat/boardgameLocal
src/client/src/app/shared/utils.ts
export * from '../../../../common/utils' import { ElementRef } from '@angular/core'; import { Card } from './models'; declare var $: any; declare type jQueryObj = any; let draggableOptionsBase = { containment:'#baseBoard', scroll: false, }; export function makeDraggable($target: ElementRef | jQueryObj, option:...
hungcat/boardgameLocal
src/client/src/app/board/board.component.ts
import { Component, OnInit, ComponentFactoryResolver, ViewChild, ViewContainerRef, } from '@angular/core'; import { Router } from '@angular/router'; import { DynamicComponentService } from "../shared/dynamic-component.service"; import { WebSocketService } from "../shared/websocket.service"; import { makeDrop...
hungcat/boardgameLocal
src/common/config.tmp.ts
<gh_stars>0 // put here as config.ts export module ClientConfig { export const wsDestination: string = ''; }; export module ServerConfig { export const serverPort: string = ''; export const isHTTPS: boolean = false; export const httpsKey: string = ''; export const httpsCert: string = ''; };
hungcat/boardgameLocal
src/server/routes/ws.ts
import { Router } from "express"; import * as expressWs from "express-ws"; import { WrapWebSocketAdapter } from "../shared/websocket-adapter"; import { BoardApp } from "../shared/board"; let router: any = Router(); expressWs(router); /* GET users listing. */ router.ws('/', WrapWebSocketAdapter([new BoardApp()])); ex...
hungcat/boardgameLocal
src/client/src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { APP_BASE_HREF } from "@angular/common"; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app.routing'; import { UserRegistration...
laojun/website
src/config/erda.ts
<reponame>laojun/website // Copyright (c) 2021 Terminus, Inc. // // 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 b...
laojun/website
src/pages/join/config.tsx
<gh_stars>0 // Copyright (c) 2021 Terminus, Inc. // // 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 ...
laojun/website
src/pages/join/detail.tsx
<gh_stars>0 // Copyright (c) 2021 Terminus, Inc. // // 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 ...
laojun/website
src/layout/common/error-page.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/pages/price/config.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/pages/home/index.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/layout/common/loginPanel.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/layout/common/user-info.tsx
<reponame>laojun/website // Copyright (c) 2021 Terminus, Inc. // // 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 b...
laojun/website
interface/style.d.ts
<gh_stars>0 declare module '*.module.scss' { const content: any; export = content; } declare module '*.png' { const content: any; export = content; } declare module '*.svg' { export function ReactComponent( props: React.SVGProps<SVGSVGElement>, ): React.ReactElement; const url: string; export defa...
laojun/website
src/types/org.d.ts
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/models/user.ts
<gh_stars>0 // Copyright (c) 2021 Terminus, Inc. // // 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 ...
laojun/website
src/pages/join/index.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/pages/home/images.ts
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/pages/contact-us/constant.ts
<filename>src/pages/contact-us/constant.ts // Copyright (c) 2021 Terminus, Inc. // // 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 // //...
laojun/website
src/layout/common/header.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/pages/home/banner.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/services/login.ts
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/layout/common/menu.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
laojun/website
src/layout/common/footer.tsx
// Copyright (c) 2021 Terminus, Inc. // // 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 agree...
ismile/syaro
src/modules/booru/BooruInfo.tsx
import React from 'react'; import { Linking, ScrollView, StyleSheet, View } from "react-native"; import { Appbar, List } from 'react-native-paper'; import { NavigationScreenProps } from 'react-navigation'; import { IPost } from '../../Services/Moebooru.api'; export default class BooruInfo extends React.PureComponent<N...
ismile/syaro
src/modules/booru/BooruSetting.tsx
import React from 'react'; import { View } from "react-native"; import { Text } from 'react-native-paper'; export default class BooruSetting extends React.PureComponent { render() { return <View style={{ flex: 1, alignItems: "center", justifyContent: "center" }}> <Text>Setting </Text> </View> } }
ismile/syaro
src/modules/booru/BooruMenu.tsx
<reponame>ismile/syaro import React from 'react'; import { StyleSheet, View, TouchableHighlight } from "react-native"; import { Appbar, List, FAB, Portal, Dialog, Button, TextInput } from 'react-native-paper'; import { NavigationScreenProps } from 'react-navigation'; import AsyncStorage from '@react-native-community/as...
ismile/syaro
src/configs/theme.ts
import React from 'react'; import { DefaultTheme, DarkTheme, Provider as PaperProvider, Theme } from 'react-native-paper'; const theme:Theme = { ...DarkTheme, dark: true, colors: { ...DarkTheme.colors, primary: '#3498db', accent: '#f1c40f', } }; export default theme;
ismile/syaro
src/components/iconize.tsx
<filename>src/components/iconize.tsx import React, {useState} from 'react'; import Icon from 'react-native-vector-icons/MaterialIcons'; export const Iconize = name => ({ tintColor }) => ( <Icon style={{ backgroundColor: 'transparent' }} name={name} color={tintColor} size={24} /> ); export default ...
ismile/syaro
src/modules/booru/BooruImage.tsx
import React from 'react'; import { View, StyleSheet } from "react-native"; import FastImage from 'react-native-fast-image'; import Image, { createImageProgress } from 'react-native-image-progress'; import ImageViewer from 'react-native-image-zoom-viewer'; import { Appbar, FAB } from 'react-native-paper'; import Progre...
ismile/syaro
src/modules/booru/BooruGallery.tsx
import { produce } from 'immer'; import React from 'react'; import { PermissionsAndroid, StyleSheet, View, Dimensions, ProgressBarAndroid, Linking } from "react-native"; import { WaterfallList } from 'react-native-largelist-v3'; import { Appbar, Button, Dialog, Divider, FAB, Menu, Portal, TextInput, ProgressBar, List }...
ismile/syaro
App.tsx
<reponame>ismile/syaro /** * @format */ import React, { Component } from 'react'; import { Platform, StyleSheet, StatusBar } from 'react-native'; import { Provider as PaperProvider } from 'react-native-paper'; import themeConfig from './src/configs/theme'; import BooruNavigator from './src/modules/booru/BooruNavigat...
ismile/syaro
src/modules/booru/BooruNavigator.tsx
<reponame>ismile/syaro import { createAppContainer, createStackNavigator } from "react-navigation"; import BooruGallery from './BooruGallery'; import BooruImage from './BooruImage'; import BooruInfo from './BooruInfo'; import BooruMenu from './BooruMenu'; const BooruNavigator = createStackNavigator({ Gallery: { ...
ismile/syaro
src/Services/Moebooru.api.ts
<filename>src/Services/Moebooru.api.ts import axios from 'axios'; export class MoebooruApi { host:string = '' http = axios; constructor(host:string='') { this.host = host; } async post(param:IPostParams={limit: 15}, config={host:this.host}) { param = { limit: 30, page: 1, ...
ismile/syaro
src/modules/booru/BooruGalleryDetail.tsx
<gh_stars>0 import React from 'react'; import { Dimensions, TouchableHighlight, View } from "react-native"; import FastImage from 'react-native-fast-image'; import { createImageProgress } from 'react-native-image-progress'; import ProgressBar from 'react-native-progress/Bar'; import theme from '../../configs/theme'; im...
Leenai0425/api
packages/rpc-core/src/packageInfo.ts
// Copyright 2017-2022 @polkadot/rpc-core authors & contributors // SPDX-License-Identifier: Apache-2.0 // Do not edit, auto-generated by @polkadot/dev export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '7.8.2-6' };
EstebanMarin/youandme
nestjs-task-management/src/tasks/pipes/task-status.pipe.ts
import { PipeTransform, BadRequestException } from "@nestjs/common"; import { TaskStatus } from "../task-status.enum"; export class TaskStatusValidationPipe implements PipeTransform { readonly validOptions = new Set([TaskStatus.CLOSED, TaskStatus.DONE, TaskStatus.OPEN]) private checkIfInvalid(value: any){ ...
EstebanMarin/youandme
nestjs-task-management/src/tasks/tasks.controller.ts
import { Controller, Get, Post, Body, Param, Delete, Patch, Query, UsePipes, ValidationPipe, ParseIntPipe, UseGuards, Logger } from '@nestjs/common'; import { TasksService } from './tasks.service'; import { TaskStatus } from './task-status.enum'; import { CreateTaskDto } from './dto/create-task.dto'; import { GetTaskFi...
Inchoker/dream
src/shared/mapper.ts
<filename>src/shared/mapper.ts<gh_stars>0 import { TaskDto } from '@todo/dto/task.dto'; import { TodoEntity } from '@todo/entity/todo.entity'; import { TodoDto } from '@todo/dto/todo.dto'; import { TaskEntity } from '@todo/entity/task.entity'; import { UserEntity } from '@user/entity/user.entity'; import { UserDto } fr...
iqbalansyor/react-native-notification-stack-card
Example/StackList.tsx
import * as React from 'react'; import { FlatList, Animated, View, StyleSheet, TouchableOpacity, TouchableHighlight, } from 'react-native'; // import { TouchableWithoutFeedback } from 'react-native-gesture-handler'; // import {TouchableHighlight} from 'react-native-gesture-handler'; interface StackListProp...
iqbalansyor/react-native-notification-stack-card
src/StackCardList.tsx
import * as React from 'react'; import { FlatList, Animated, View, StyleSheet, TouchableOpacity, TouchableHighlight, } from 'react-native'; interface StackCardListProps { visibleItems: number | 3; stackType?: 'below' | 'above'; data: any[]; itemWidth: number | 100; itemHeight: number | 100; spa...
SLS8h/DeborahKk
app/customers/customer.ts
export class Customer { constructor(public firstName = '', public lastName = '', public email = '', public phone = '', public notification = 'email') {} }
SLS8h/DeborahKk
app/customers/customer.component.ts
<reponame>SLS8h/DeborahKk import { Component, OnInit, AfterViewInit, ViewChildren, ElementRef } from '@angular/core'; import { FormGroup, FormBuilder, Validators, AbstractControl, FormControlName } from '@angular/forms'; import 'rxjs/add/operator/debounceTime'; import 'rxjs/add/observable/fromEvent'; import 'rxjs/add/...
effortcheep/vue3-mobile-template
src/router/index.ts
import { createRouter, createWebHashHistory } from 'vue-router' // import routes from './router' // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore import routes from 'virtual:generated-pages' console.log(routes) export default createRouter({ routes, history: createWebHashHistory(), })
effortcheep/vue3-mobile-template
src/service/request/interceptors.ts
<gh_stars>1-10 import type { AxiosRequestConfig, AxiosResponse } from 'axios' export const requestInterceptor = ( config: AxiosRequestConfig, ): AxiosRequestConfig => { return config } export const responseInterceptor = (res: AxiosResponse): AxiosResponse => { return res }
effortcheep/vue3-mobile-template
src/views/home/home.api.ts
<reponame>effortcheep/vue3-mobile-template import http from '@/service' export declare interface Type { a: number } export function foo(): Promise<Type> { return http.get<Type>({ url: '/get', params: { a: 1, b: 1 }, }) }
effortcheep/vue3-mobile-template
src/service/request/index.ts
import axios from 'axios' import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios' interface SJRequestInterceptors<T = AxiosResponse> { requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig requestInterceptorCatch?: (error: any) => any responseInterceptor?: (res: T) => T ...
effortcheep/vue3-mobile-template
src/store/counter.ts
import { defineStore } from 'pinia' export const useCounterStore = defineStore('counter', { state() { return {} }, getters: {}, actions: {}, })
effortcheep/vue3-mobile-template
src/service/index.ts
<reponame>effortcheep/vue3-mobile-template import SJRequest from './request' import { requestInterceptor, responseInterceptor } from './request/interceptors' const baseURL = import.meta.env.VITE_APP_HOST || 'http://baidu1.com' const http = new SJRequest({ baseURL, timeout: 30 * 1000, interceptors: { requestIn...
effortcheep/vue3-mobile-template
vite.config.ts
<reponame>effortcheep/vue3-mobile-template<filename>vite.config.ts<gh_stars>1-10 import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import styleImport, { VantResolve } from 'vite-plugin-style-import' import viteCompression from 'vite-plugin-compression' import importToCDN from 'vite-plugin-cdn-imp...
effortcheep/vue3-mobile-template
src/router/router.ts
import type { RouteRecordRaw } from 'vue-router' const pages = import.meta.glob('../views/*/*.vue') const routes = Object.keys(pages).map(pathToRoute).filter(notEmpty) export default routes function notEmpty<T>(value: T | null | undefined): value is T { return value !== null && value !== undefined } function pat...
pixijs/gif
src/AnimatedGIF.ts
import { Sprite } from '@pixi/sprite'; import { Texture, Renderer } from '@pixi/core'; import { settings } from '@pixi/settings'; import { SCALE_MODES } from '@pixi/constants'; import { Ticker, UPDATE_PRIORITY } from '@pixi/ticker'; import { parseGIF, decompressFrames } from 'gifuct-js'; /** * Frame object. */ inter...
pixijs/gif
test/AnimatedGIF.tests.ts
import { AnimatedGIF } from '../src'; import fs from 'fs'; import { expect } from 'chai'; import path from 'path'; function toArrayBuffer(buffer: Buffer): ArrayBuffer { const ab = new ArrayBuffer(buffer.length); const view = new Uint8Array(ab); for (let i = 0; i < buffer.length; ++i) { view[i]...
pixijs/gif
global.d.ts
declare namespace GlobalMixins { interface LoaderResource { /** Texture reference for loading images and other textures. */ animation?: import('./').AnimatedGIF; } }
pixijs/gif
scripts/fix-types.ts
import fs from 'fs'; import path from 'path'; const prepend = `/// <reference path="./global.d.ts" />`; // Patch global.d.ts into the api-extractor output // because api doesn't support exporting global definitions (ambient types) (async () => { const typesFile = path.resolve(__dirname, '../index.d.ts'); cons...
pixijs/gif
test/AnimatedGIFLoader.tests.ts
<gh_stars>10-100 import { AnimatedGIFLoader, AnimatedGIF } from '../src'; import { expect } from 'chai'; import { Loader } from '@pixi/loaders'; import { createServer } from './resources'; describe('AnimatedGIFLoader', function () { before(function () { Loader.registerPlugin(AnimatedGIFLoader); ...
pixijs/gif
src/index.ts
<gh_stars>10-100 /** * @namespace PIXI */ /** * @namespace PIXI.gif */ export * from './AnimatedGIFLoader'; export * from './AnimatedGIF';
pixijs/gif
src/AnimatedGIFLoader.ts
<filename>src/AnimatedGIFLoader.ts<gh_stars>10-100 import { LoaderResource } from '@pixi/loaders'; import type { ILoaderPlugin } from '@pixi/loaders'; import { AnimatedGIF } from './AnimatedGIF'; /** Default extension for GIF images */ const GIF_EXTENSION = 'gif'; // Satsify the LoaderResource interface declare globa...
pixijs/gif
test/resources/index.ts
<reponame>pixijs/gif<filename>test/resources/index.ts /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ import * as http from 'http'; import * as fs from 'fs'; import * as path from 'path'; const mimeTypes: Record<string, string> = { '.gif': 'image/gif', }; /** * Very HTTP server to requesti...
pixijs/gif
test/index.ts
import './AnimatedGIF.tests'; import './AnimatedGIFLoader.tests';
0xBeaver/snarkswap-client
src/lib/swap.spec.ts
<gh_stars>1-10 import test from 'ava'; import { toWei } from 'web3-utils'; import { Note } from './note'; import { hideSwap, SwapType } from './swap'; import { privToPubKey } from './utils'; test('hideSwap & verifySwap', async (t) => { const privKey = '10203040506070809000102030405060708090001020304050607080900...