repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
ACM-VIT/uniauth-backend
src/dashboard/dto/create-dashboard.dto.ts
<gh_stars>100-1000 export class CreateDashboardDto {}
ACM-VIT/uniauth-backend
src/dashboard/dashboard.service.ts
<reponame>ACM-VIT/uniauth-backend import { Injectable } from '@nestjs/common'; import { CreateDashboardDto } from './dto/create-dashboard.dto'; import { UpdateDashboardDto } from './dto/update-dashboard.dto'; @Injectable() export class DashboardService { create(createDashboardDto: CreateDashboardDto) { return 'T...
ACM-VIT/uniauth-backend
src/account/constants/access_token.constants.ts
import * as config from 'config'; export const accessTokenJwtConstants = { secret: config.get('access_token.secret'), expiresIn: config.get('access_token.expires'), issuer: config.get('access_token.issuer'), };
ACM-VIT/uniauth-backend
src/auth/dto/login.dto.ts
import { IsEmail, IsNotEmpty } from 'class-validator'; import { ApiProperty } from '@nestjs/swagger'; export class LoginDto { /** college email id of student */ @IsNotEmpty() @IsEmail() @ApiProperty({ description: 'college email id of student ', example: '<EMAIL>', required: true, }) email: s...
ACM-VIT/uniauth-backend
src/user/user.repository.ts
<gh_stars>0 import { Injectable, UseFilters } from '@nestjs/common'; import { InjectModel } from '@nestjs/mongoose'; import { Model } from 'mongoose'; import { MongoExceptionFilter } from 'src/auxiliary/exceptions/mongo.exceptions'; import { CreateUserDto } from './dto/create-user.dto'; import { User, UserDocument } fr...
ACM-VIT/uniauth-backend
src/account/dto/create-account.dto.ts
<filename>src/account/dto/create-account.dto.ts export class CreateAccountDto {}
ACM-VIT/uniauth-backend
src/dashboard/dto/update-dashboard.dto.ts
import { PartialType } from '@nestjs/mapped-types'; import { CreateDashboardDto } from './create-dashboard.dto'; export class UpdateDashboardDto extends PartialType(CreateDashboardDto) {}
kenyipp/rounding-values
index.d.ts
<filename>index.d.ts "use strict"; declare namespace roundingValues { interface Options { /** Recurse nested objects and objects in arrays. @default false */ readonly deep?: boolean; /** Exclude keys from being rounding. @default [] */ readonly exclude?: ReadonlyArray<string | RegExp>; /** ...
shravankulkarni05/iv-insta-profile-viewer
src/app/app-routing.module.ts
import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { IpvDashboardComponent } from './features/insta-profile-viewer/ipv-dashboard/ipv-dashboard.component'; const routes: Routes = [ {path: '', component: IpvDashboardComponent}, {path: 'ipv', component: IpvDashboar...
shravankulkarni05/iv-insta-profile-viewer
src/app/shared/shared-constants.ts
<gh_stars>0 export class SharedConstants { public static readonly PROXY_API = '/iv/'; public static readonly INSTA_PROF_SUFFIX = '/?__a=1' public static readonly INSTA_WEB_URL = 'https://www.instagram.com/' }
shravankulkarni05/iv-insta-profile-viewer
src/app/shared/iv-footer/iv-footer.component.spec.ts
import { ComponentFixture, TestBed } from '@angular/core/testing'; import { IvFooterComponent } from './iv-footer.component'; describe('IvFooterComponent', () => { let component: IvFooterComponent; let fixture: ComponentFixture<IvFooterComponent>; beforeEach(async () => { await TestBed.configureTestingModu...
shravankulkarni05/iv-insta-profile-viewer
src/app/shared/directives/image-loader.directive.ts
<gh_stars>0 import { Directive, Attribute, Renderer2, ElementRef, HostListener } from '@angular/core'; @Directive({ selector: '[imageLoader]' }) export class ImageLoaderDirective { constructor(@Attribute('loader') public loader: string, @Attribute('onErrorSrc') public onErrorSrc: string, private rendere...
shravankulkarni05/iv-insta-profile-viewer
src/app/features/insta-profile-viewer/ipv-profile/ipv-profile.component.ts
<gh_stars>0 import { Component, Input } from '@angular/core'; import { InstaProfileData } from '../ipv-dashboard/ipv-dashboard.component'; @Component({ selector: 'app-ipv-profile', templateUrl: './ipv-profile.component.html', styleUrls: ['./ipv-profile.component.css'] }) export class IpvProfileComponent { @Inp...
shravankulkarni05/iv-insta-profile-viewer
src/app/shared/shared.module.ts
import { NgModule } from '@angular/core'; import { IvFooterComponent } from './iv-footer/iv-footer.component'; import { IvHeaderComponent } from './iv-header/iv-header.component'; import { ImageLoaderDirective } from './directives/image-loader.directive'; @NgModule({ declarations: [IvHeaderComponent, IvFooterCompone...
shravankulkarni05/iv-insta-profile-viewer
src/app/app.module.ts
<filename>src/app/app.module.ts import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { AppRoutingModule } from './app-routing.module'; import { SharedModule } from './shared/shared.module'; import { IpvDashboardCompo...
shravankulkarni05/iv-insta-profile-viewer
src/app/features/insta-profile-viewer/ipv-dashboard/ipv-dashboard.component.ts
<filename>src/app/features/insta-profile-viewer/ipv-dashboard/ipv-dashboard.component.ts import { Component, OnInit } from '@angular/core'; import { APIService } from 'src/app/shared/api-service'; import { SharedConstants } from 'src/app/shared/shared-constants'; export interface InstaProfileData { userName: string;...
Noah2610/chat-app
src/components/user-avatar.tsx
import { Avatar, AvatarProps } from "@material-ui/core"; import { AccountCircle } from "@material-ui/icons"; import { getNameInitials } from "../util"; export type UserAvatarProps = { name?: string | null; email?: string | null; src?: string | null; } & Omit<AvatarProps, "src">; export default function Us...
Noah2610/chat-app
src/components/app-bar.tsx
import { createStyles, makeStyles, AppBar, Box, Toolbar, } from "@material-ui/core"; import Heading from "./heading"; import Login from "./login"; const useStyles = makeStyles((_theme) => createStyles({ root: { borderTopLeftRadius: 4, borderTopRightRadius: 4, ...
Noah2610/chat-app
src/components/centered.tsx
<gh_stars>0 import { Box, BoxProps } from "@material-ui/core"; export type CenteredProps = BoxProps; export default function Centered(props: CenteredProps) { return ( <Box display="flex" justifyContent="center" alignItems="center" {...props} /> )...
Noah2610/chat-app
src/firebase/api/messages.ts
<gh_stars>0 import { useCollectionData } from "react-firebase-hooks/firestore"; import { DataOptions as UseCollectionDataOptions } from "react-firebase-hooks/firestore/dist/firestore/types"; import { Query } from "."; import { firestore } from ".."; import { CollectionReference, FirebaseError, Message, ...
Noah2610/chat-app
src/util/index.ts
<filename>src/util/index.ts import { Timestamp } from "../firebase/types"; export function formatTimestamp(timestamp: Timestamp): string { if (!timestamp) { return "--:--:--"; } const today = new Date(); const dateInst = new Date(timestamp.seconds * 1000); const date = { year: date...
Noah2610/chat-app
src/pages/_app.tsx
import { AppProps } from "next/app"; import { ThemeProvider, CssBaseline } from "@material-ui/core"; import theme from "../theme"; export default function App({ pageProps, Component }: AppProps) { return ( <> <ThemeProvider theme={theme}> <CssBaseline /> <Compon...
Noah2610/chat-app
src/firebase/types/index.ts
import firebase from "firebase/app"; export type { default as Message } from "./message"; export type Id = string; export type Ref = any; export type Uid = string; export type WithId<T> = T & { id: Id }; export type WithRef<T> = T & { ref: Ref }; export type WithIdAndRef<T> = WithId<WithRef<T>>; export type Timestamp ...
Noah2610/chat-app
src/pages/index.tsx
<reponame>Noah2610/chat-app import { Box } from "@material-ui/core"; import App from "../components/app"; export default function Home() { return ( <> <Box maxWidth="640px" marginX="auto"> <App /> </Box> </> ); }
Noah2610/chat-app
src/components/chat-messages-list/list-item.tsx
import { memo } from "react"; import { Avatar, Box, Paper, Theme, Typography, createStyles, makeStyles, } from "@material-ui/core"; import ReactMarkdown from "react-markdown"; import { Message, Uid } from "../../firebase/types"; import { formatTimestamp } from "../../util"; export type Chat...
Noah2610/chat-app
src/firebase/api/index.ts
<gh_stars>0 export type { Query } from "@firebase/firestore-types"; export * from "./messages";
Noah2610/chat-app
src/components/heading.tsx
<filename>src/components/heading.tsx import { Typography, TypographyProps } from "@material-ui/core"; type HeadingProps = { children: React.ReactNode; } & TypographyProps; export default function Heading({ children, ...props }: HeadingProps) { return ( <Typography color="textPrimary" variant="h1" {......
Noah2610/chat-app
src/theme.ts
<filename>src/theme.ts import { createMuiTheme } from "@material-ui/core"; export default createMuiTheme({ palette: { primary: { main: "#601ea8", light: "#934edb", dark: "#2a0078", contrastText: "#cccccc", }, secondary: { main: "#5...
Noah2610/chat-app
src/components/chat-messages-list/index.tsx
<gh_stars>0 import { createStyles, makeStyles, Box } from "@material-ui/core"; import { useAuthState } from "react-firebase-hooks/auth"; import ListItem from "./list-item"; import { auth } from "../../firebase"; import { Message, WithIdAndRef } from "../../firebase/types"; export type ChatMessagesListProps = { mes...
Noah2610/chat-app
src/components/app.tsx
import { Box } from "@material-ui/core"; import AppBar from "./app-bar"; import ChatRoom from "./chat-room"; export default function App() { return ( <> <Box position="relative"> <AppBar /> <ChatRoom /> </Box> </> ); }
Noah2610/chat-app
src/components/login.tsx
import { Box, Button, CircularProgress, IconButton } from "@material-ui/core"; import firebase from "firebase/app"; import { useAuthState } from "react-firebase-hooks/auth"; import UserAvatar from "./user-avatar"; import { auth } from "../firebase"; export default function Login() { const [user, isLoading] = useAu...
Noah2610/chat-app
src/components/chat-input.tsx
import { useState } from "react"; import { Box, Button, CircularProgress, FormControl, Icon, TextField, } from "@material-ui/core"; import SendIcon from "@material-ui/icons/Send"; export type ChatInputProps = { sendMessage: (message: string) => Promise<void>; }; export default function Cha...
Noah2610/chat-app
src/firebase/types/message.ts
<gh_stars>0 import { Timestamp, Uid } from "../types"; type Message = { content: string; createdAt: Timestamp; uid: Uid; photoURL: string | null; }; export default Message;
Noah2610/chat-app
src/components/chat-room.tsx
import { Box, CircularProgress, Paper } from "@material-ui/core"; import firebase from "firebase/app"; import { useAuthState } from "react-firebase-hooks/auth"; import ChatMessagesList from "./chat-messages-list"; import ChatInput from "./chat-input"; import Centered from "./centered"; import { auth } from "../firebase...
Noah2610/chat-app
src/firebase/index.ts
import firebase from "firebase/app"; import "firebase/firestore"; import "firebase/auth"; if (typeof window !== undefined) { if (firebase.apps.length === 0) { firebase.initializeApp({ apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY, authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH...
rwblair/BLiMP
neuroscout/frontend/src/Routes.tsx
import * as React from 'react'; import { Route, Redirect, Switch } from 'react-router-dom'; import { message } from 'antd'; import './css/App.css'; import AnalysisList from './AnalysisList'; import AnalysisBuilder from './analysis_builder/Builder'; import { AppState } from './coretypes'; import { config } from './conf...
rwblair/BLiMP
neuroscout/frontend/src/coretypes.ts
/* Type definitinos for key models, such as analysis, run, predictor, contrast, transformation, etc. The data models below are largely UI agonstic. This module is a good starting point to understand the shape of the data in the frontend app. All resusable type definitions should go into this module. */ export type ...
rwblair/BLiMP
neuroscout/frontend/src/analysis_builder/Contrasts.tsx
<reponame>rwblair/BLiMP /* This module includes the following components: - ContrastsTab: parent component for the contrast tab of the analysis builder - ContrastDisplay: component to display a single contrast */ import * as React from 'react'; import { Button, Row, Col, Icon, List } from 'antd'; import { DragDro...
rwblair/BLiMP
neuroscout/frontend/src/utils/index.ts
<filename>neuroscout/frontend/src/utils/index.ts import { message } from 'antd'; import { authActions } from '../auth.actions'; // Display error to user as a UI notification and log it to console export const displayError = (error: Error) => { try { message.error(error.toString(), 5); } catch (e) { // to m...
rwblair/BLiMP
neuroscout/frontend/src/App.tsx
<filename>neuroscout/frontend/src/App.tsx<gh_stars>0 /* Top-level App component containing AppState. The App component is currently responsible for: - Authentication (signup, login and logout) - Routing - Managing user's saved analyses (list display, clone and delete) */ import * as React from 'react'; import { Browser...
alexandrepa/caprine
source/browser/selectors.ts
export default { conversationList: 'div[role="navigation"] > div > ul', conversationSelector: '._4u-c._1wfr .__i_, ._4u-c._1wfr #conversationWindow' };
stscoundrel/goodbrother
src/client.ts
<gh_stars>0 import axios from 'axios'; import { PullRequest, PullRequestSearchResponses } from './models/pull-request'; import { fromPullRequestSearchResponse } from './mappers/pull-requests'; const API_URL = 'https://api.github.com'; const MAX_REQUESTS = 5; const getPullRequestsByUser = async (username: string) : Pr...
stscoundrel/goodbrother
tests/unit/pull-requests.test.ts
<gh_stars>0 import axios from 'axios'; import mockPrSearchResponse from '../fixtures/pr-search-response.json'; import { getPullRequestsByUser, groupPullRequestsByRepository } from '../../src'; jest.mock('axios'); describe('Goodbrother PR tests', () => { beforeEach(() => { axios.get.mockRestore(); }); test(...
stscoundrel/goodbrother
src/models/pull-request.ts
<reponame>stscoundrel/goodbrother export interface PullRequestUser { login: string, } export interface PullRequest { id: string, name: string, link: string, isDependabot: boolean, repository: string, } export interface PullRequestSearchResponse { id: string, title: string, user: PullRequestUser, h...
stscoundrel/goodbrother
tests/integration/github.test.ts
<reponame>stscoundrel/goodbrother<filename>tests/integration/github.test.ts import { getPullRequestsByUser, groupPullRequestsByRepository } from '../../src'; describe('Goodbrother integration test suite', () => { test('Gets PRs by user', async () => { const result = await getPullRequestsByUser('stscoundrel'); ...
stscoundrel/goodbrother
src/mappers/pull-requests.ts
<reponame>stscoundrel/goodbrother import { PullRequestSearchResponse, PullRequest } from '../models/pull-request'; export const fromPullRequestSearchResponse = (pullRequestResponse: PullRequestSearchResponse) : PullRequest => ({ id: pullRequestResponse.id, name: pullRequestResponse.title, link: pullRequestRespon...
stscoundrel/goodbrother
src/models/repository.ts
<filename>src/models/repository.ts<gh_stars>0 import { PullRequest } from './pull-request'; export interface RepositorySummary { name: string, link: string, count: number, pullRequests: PullRequest[], }
stscoundrel/goodbrother
src/index.ts
<filename>src/index.ts<gh_stars>0 import { RepositorySummary } from './models/repository'; import { PullRequest } from './models/pull-request'; import client from './client'; export const groupPullRequestsByRepository = (pullRequests: PullRequest[]) : RepositorySummary[] => { const summaries: RepositorySummary[] = [...
SudoDotDog/Sudoo-Flag
test/mock/declare.ts
/** * @author WMXPY * @namespace Flag * @description Declare * @override Mock */ export type MockTwoFlagType = 'hello' | 'world';
SudoDotDog/Sudoo-Flag
src/declare.ts
/** * @author WMXPY * @namespace Flag * @description Declare */ export type FlagConfig<F extends string> = { readonly target: string; readonly flags: F[]; }; export type FlagStorage<F extends string> = { readonly targets: string[]; readonly flags: Array<FlagConfig<F>>; };
SudoDotDog/Sudoo-Flag
test/unit/util.test.ts
<reponame>SudoDotDog/Sudoo-Flag /** * @author WMXPY * @namespace Flag * @description Util * @override Unit Test */ import { expect } from "chai"; import * as Chance from "chance"; import { FlagConfig, utilAttachFlag, utilRemoveFlag } from "../../src"; import { MockTwoFlagType } from "../mock/declare"; describe('...
SudoDotDog/Sudoo-Flag
src/util.ts
<reponame>SudoDotDog/Sudoo-Flag<filename>src/util.ts /** * @author WMXPY * @namespace Flag * @description Util */ import { FlagConfig } from "./declare"; export const utilAttachFlag = <F extends string>(flagConfig: FlagConfig<F>, newFlag: F): FlagConfig<F> => { const existFlags: F[] = flagConfig.flags; ...
SudoDotDog/Sudoo-Flag
src/flag.ts
/** * @author WMXPY * @namespace Flag * @description Flag */ import { FlagConfig, FlagStorage } from "./declare"; import { utilAttachFlag, utilRemoveFlag } from "./util"; export class FlagManager<F extends string = string> { public static empty<F extends string = string>(): FlagManager<F> { return n...
SudoDotDog/Sudoo-Flag
src/index.ts
/** * @author WMXPY * @namespace Flag * @description index */ export * from "./declare"; export * from "./flag"; export * from "./util";
PixDay/Pokedex
src/app/models/pokemon.model.ts
export class Pokemon { name: string; image: string; id: number; pokemonId: number; types: string[]; default_competencies: string[]; }
PixDay/Pokedex
src/app/services/pokemons/pokemons.service.ts
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Pokemon } from 'src/app/models/pokemon.model'; @Injectable({ providedIn: 'root' }) export class PokemonsService { constructor(private http: HttpClient) { } getPokemon(id: number, listOfPokemons: Pokemon[], l...
PixDay/Pokedex
src/app/pages/regions/regions.component.ts
import { Component, OnInit } from '@angular/core'; import { PokedexService } from 'src/app/services/pokedex/pokedex.service'; import { PokemonsService } from 'src/app/services/pokemons/pokemons.service'; import { Pokemon } from 'src/app/models/pokemon.model'; @Component({ selector: 'app-regions', templateUrl: './r...
PixDay/Pokedex
src/app/services/pokedex/pokedex.service.ts
import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Pokemon } from 'src/app/models/pokemon.model'; import { PokemonsService } from '../pokemons/pokemons.service'; @Injectable({ providedIn: 'root' }) export class PokedexService { constructor(private http: HttpCli...
beremm14/Swift_Pi_Test
Pi_Node_Server/src/server.ts
// Node.js Modul import * as path from 'path'; // Externes Modul (via npm installieren) import * as express from 'express'; import * as bodyParser from 'body-parser'; export class Server { private _port: number; private _server: express.Express; constructor (port: number) { const assetsPath = path.join(_...
beremm14/Swift_Pi_Test
Pi_Node_Server/src/main.ts
import { Server } from './server'; class Main { public static main () { const server = new Server(8080); server.start(); } } Main.main();
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/stomp.ts
<reponame>virtualmusicsoft/gamma<filename>server-midi/front-end-ionic2/app/stomp.ts<gh_stars>0 // Generated by CoffeeScript 1.7.1 /* Stomp Over WebSocket http://www.jmesnil.net/stomp-websocket/doc/ | Apache License V2.0 Copyright (C) 2010-2013 [<NAME>](http://jmesnil.net/) Copyright (C) 2012 [FuseSource, Inc...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/pages/choose-chord/choose-chord.ts
<gh_stars>0 import {Page, NavController, NavParams, Alert} from 'ionic-angular'; import {GameChordPage} from '../game-chord/game-chord'; @Page({ templateUrl: 'build/pages/choose-chord/choose-chord.html' }) export class ChooseChordPage { constructor(private nav: NavController, private navParams: Nav...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/providers/git-hub-service/git-hub-service.ts
import {Injectable} from '@angular/core'; import {Http, Headers} from '@angular/http'; import 'rxjs/add/operator/map'; @Injectable() export class GitHubService { constructor(private http: Http) { } getRepos(username) { let repos = this.http.get(`https://api.github.com/users/${username}/repos`); return r...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/pages/choose-game/choose-game.ts
<reponame>virtualmusicsoft/gamma import {Page, NavController, NavParams, Alert} from 'ionic-angular'; import {GamePage} from '../game/game'; import {NoteLevel} from '../../providers/note-service/note-service'; @Page({ templateUrl: 'build/pages/choose-game/choose-game.html' }) export class ChooseGamePage { public s...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/typings/index.d.ts
/// <reference path="modules/debug/index.d.ts" /> /// <reference path="modules/stomp-websocket/stomp-websocket.d.ts" />
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/pages/result/result.ts
<filename>server-midi/front-end-ionic2/app/pages/result/result.ts import {Page, NavController, NavParams, ViewController} from 'ionic-angular'; import {ChooseGamePage} from '../choose-game/choose-game'; import {RecordsService} from '../../providers/records-service/records-service'; /* Generated class for the Result...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/providers/midiinput-service/midiinput-service.ts
<gh_stars>0 import {Injectable} from '@angular/core'; import * as SockJS from 'sockjs-client'; import BaseEvent = __SockJSClient.BaseEvent; import SockJSClass = __SockJSClient.SockJSClass; export interface HandleMidiInputListerner { handleMidiInput(message:string):void; } export interface ConnectionListerner { ...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/app.ts
<filename>server-midi/front-end-ionic2/app/app.ts<gh_stars>0 import {App, Platform, Storage, SqlStorage} from 'ionic-angular'; import {StatusBar} from 'ionic-native'; import {HomePage} from './pages/home/home'; import {ConnectMidiInputPage} from './pages/connect-midiinput/connect-midiinput'; import {MidiInputService} f...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/providers/note-service/note-service.ts
import {Injectable} from '@angular/core'; export class NoteHtml { constructor(public src:string, public left:string, public top:string) {} static Default = class { static left_upwline : string = "80px"; static left_upwoline : string = "86px"; } static Clave = class { static Sol ...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/pages/connect-midiinput/connect-midiinput.ts
import {Page, NavController} from 'ionic-angular'; import {ChooseGamePage} from '../choose-game/choose-game'; import {ChooseChordPage} from '../choose-chord/choose-chord'; import {MidiInputService} from '../../providers/midiinput-service/midiinput-service'; import {ConnectionListerner} from '../../providers/midiinput-s...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/providers/records-service/records-service.ts
<gh_stars>0 import {Injectable} from '@angular/core'; import {Http} from '@angular/http'; import 'rxjs/add/operator/map'; import {App, Platform, Storage, SqlStorage} from 'ionic-angular'; /* Generated class for the RecordsService provider. See https://angular.io/docs/ts/latest/guide/dependency-injection.html fo...
virtualmusicsoft/gamma
server-midi/front-end-ionic2/app/pages/game/game.ts
/// <reference path="../../../node_modules/retyped-sockjs-client-tsd-ambient/sockjs-client.d.ts" /> /// <reference path="../../../typings/modules/stomp-websocket/stomp-websocket.d.ts" /> import {Page, NavController, NavParams, Alert} from 'ionic-angular'; import {NoteService, Note, NoteHtml, ClaveFa, ClaveSol, NoteLeve...
mainnika/npm-jayson
index.d.ts
import { EventEmitter } from 'events'; export interface ClientOptions { reviver?: Function; replacer?: Function; version?: number; generator?: Function; encoding?: string; } export interface ServerOptions { reviver?: Function; replacer?: Function; router?: Function; collect?: boolean; params?: any...
mainnika/npm-jayson
test.ts
<filename>test.ts<gh_stars>0 /// <reference path="./bundle.d.ts" /> import * as jayson from 'jayson'; class ExtendFromJaysonClient extends jayson.Client { public static get Create(): ExtendFromJaysonClient { return new ExtendFromJaysonClient(); } public static test(): void { const client: ExtendFrom...
michivo/mss22-sample-frontend
src/app/articles/articles.service.spec.ts
import { HttpClient } from '@angular/common/http'; import { TestBed } from '@angular/core/testing'; import { NGXLogger } from 'ngx-logger'; import { LoggerTestingModule } from 'ngx-logger/testing'; import { of } from 'rxjs'; import { asyncData } from '../helpers/async-observable-helpers'; import { Article } from './art...
michivo/mss22-sample-frontend
src/app/app.module.ts
<filename>src/app/app.module.ts import { HttpClientModule } from '@angular/common/http'; import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; import { ArticleListComp...
michivo/mss22-sample-frontend
src/app/articles/article-details/article-details.component.ts
<filename>src/app/articles/article-details/article-details.component.ts import { Component, Input, OnInit } from '@angular/core'; import { Article } from '../article'; @Component({ selector: 'tr[app-article-details]', templateUrl: './article-details.component.html', styleUrls: ['./article-details.component.scss'...
michivo/mss22-sample-frontend
src/app/utils/http-error-response.ts
<gh_stars>1-10 import { HttpErrorResponse } from '@angular/common/http'; export function getErrorMessage(response: HttpErrorResponse): string { if (response === undefined) { return ''; } else if (response.error === undefined) { return response.message; } else if (response.error instanceof Object) ...
michivo/mss22-sample-frontend
src/app/utils/non-empty.response.ts
export class NonEmptyResponse<T> { constructor( public success: boolean, public errorMessage: string, public data?: T, ) { } }
michivo/mss22-sample-frontend
src/app/articles/article.ts
<filename>src/app/articles/article.ts export interface Article { identifier: string, identifierType: string, name: string, description: string, }
michivo/mss22-sample-frontend
src/app/articles/articles.service.ts
import { Injectable } from '@angular/core'; import { HttpClient, HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { Article } from './article'; import { NonEmptyResponse } from './../utils/non-empty.response'; import { getErrorMessage } from './../utils/http-error-response'; import { Observable, of...
michivo/mss22-sample-frontend
src/app/articles/article-list/article-list.component.ts
<filename>src/app/articles/article-list/article-list.component.ts import { Component, OnDestroy, OnInit } from '@angular/core'; import { Subject, takeUntil } from 'rxjs'; import { Article } from '../article'; import { ArticleService } from '../articles.service'; @Component({ selector: 'app-article-list', templateU...
michivo/mss22-sample-frontend
src/app/articles/article-creation/article-creation.component.ts
<gh_stars>1-10 import { Component, EventEmitter, Output } from '@angular/core'; import { Article } from '../article'; @Component({ selector: 'app-article-creation', templateUrl: './article-creation.component.html', styleUrls: ['./article-creation.component.scss'] }) export class ArticleCreationComponent { @Ou...
yjcyun/adopt_korean_dogs_api
src/dogs/dogs.model.ts
<reponame>yjcyun/adopt_korean_dogs_api export interface Dog { id: string; name: string; description: string; location: Location; status: AdoptionStatus; } export enum Location { KOREA = 'KOREA', TORONTO = 'TORONTO', VANCOUVER = 'VANCOUVER', NEW_YORK = 'NEW_YORK', LOS_ANGELES = 'LOS_ANGELES', CHIC...
yjcyun/adopt_korean_dogs_api
src/dogs/dto/get-dogs-filter.dto.ts
import { IsEnum, IsOptional, IsString } from 'class-validator'; import { AdoptionStatus } from '../dogs.model'; export class GetDogsFilterDto { @IsOptional() @IsEnum(AdoptionStatus) status?: AdoptionStatus; @IsOptional() @IsString() search?: string; }
yjcyun/adopt_korean_dogs_api
src/dogs/dogs.service.ts
import { Injectable, NotFoundException } from '@nestjs/common'; import { v4 as uuid } from 'uuid'; import { CreateDogDto } from './dto/create-dogs.dto'; import { AdoptionStatus, Dog, Location } from './dogs.model'; import { GetDogsFilterDto } from './dto/get-dogs-filter.dto'; @Injectable() export class DogsService { ...
yjcyun/adopt_korean_dogs_api
src/dogs/dto/update-dogs-status.dto.ts
<gh_stars>0 import { IsEnum } from 'class-validator'; import { AdoptionStatus } from '../dogs.model'; export class UpdateDogsStatusDto { @IsEnum(AdoptionStatus) status: AdoptionStatus; }
yjcyun/adopt_korean_dogs_api
src/dogs/dogs.controller.ts
import { UpdateDogsStatusDto } from './dto/update-dogs-status.dto'; import { Body, Controller, Delete, Get, Param, Patch, Post, Query, } from '@nestjs/common'; import { DogsService } from './dogs.service'; import { Dog } from './dogs.model'; import { CreateDogDto } from './dto/create-dogs.dto'; import ...
JoshuaKGoldberg/typestat-example
src/index.ts
<reponame>JoshuaKGoldberg/typestat-example export const withString1 = (arg) => arg; export const withString2 = (arg) => arg; export const withString3 = (arg) => arg; export const usesWithString = () => { return [withString1(""), withString2(""), withString3("")]; };
ludorival/smart-issue-tracker-sdk
test/generator.ts
<gh_stars>1-10 import { values } from 'lodash' import { Comparator, EventHandler, Issue, TrackIssueOptions, trackIssues, } from '../src/index' export interface Error { timestamp: number message: string ignored?: boolean customAttribute?: number } export interface TestIssue extends Issue<Error> { ti...
ludorival/smart-issue-tracker-sdk
usage.ts
import { trackIssues, IssueClient, Comparator, Issue } from './src' // --- your occurence type interface Occurrence { timestamp: number message: string } // --- your issue type interface MyIssueType extends Issue<Occurrence> { title: string body: string comments: string[] newOccurrences: Occurrence[] } // ...
ludorival/smart-issue-tracker-sdk
test/index.test.ts
<reponame>ludorival/smart-issue-tracker-sdk<gh_stars>1-10 import { difference } from 'lodash' import { Comparator, trackIssues } from '../src/index' import { anError, Error, TestIssue, initOptions } from './generator' describe('Track New Errors', () => { test('should track a new error', async () => { // given ...
ludorival/smart-issue-tracker-sdk
src/trackIssues.ts
<filename>src/trackIssues.ts import { EventHandler, Hook, Issue, TrackIssueOptions, TrackedIssue, Comparator, } from '.' export async function trackIssues<T extends Issue<R>, R>( occurrences: R[], { issueClient, hooks: { initializeNewIssue = (occurrence: R) => ({ occurrences: [occ...
ludorival/smart-issue-tracker-sdk
src/index.ts
<gh_stars>1-10 'use strict' export * from './trackIssues' export interface Issue<T> { id?: string url?: string occurrences: T[] } export type TrackedIssue<T> = T & { id: string } export interface IssueClient<T extends Issue<R>, R> { createIssue(issue: T): Promise<TrackedIssue<T>> updateIssue(issue: Tracke...
secoya/hablar.js
src/analysis/type_inference.ts
import { ASTRoot as ConstraintAST, Node as ConstraintNode } from '../trees/constraint'; import { Node as ExprNode, TypedBinaryOpNode, TypedFunctionInvocationNode, TypedNode as TypedExprNode, TypedNumberNode, TypedStringLiteralNode, TypedVariableNode, VariableNode as ExprVariableNode, } from '../trees/expression...
secoya/hablar.js
test/analysis/expression_type_inference.ts
import * as infer from '../../src/analysis/type_inference'; import { Node as ConstraintNode } from '../../src/trees/constraint'; import { BinaryOpNode, FunctionInvocationNode, Node, NumberNode, StringLiteralNode, TypedBinaryOpNode, TypedFunctionInvocationNode, TypedNode, TypedNumberNode, TypedStringLiteralNo...
secoya/hablar.js
test/analysis/constraints_type_inference.ts
<filename>test/analysis/constraints_type_inference.ts import * as infer from '../../src/analysis/type_inference'; import TypeMap from '../../src/type_map'; import { ConstraintTypeUsage, TypeInfo, TypeUsage } from '../../src/type_map'; import { EnumNode, EqualityNode, GenderNode, IdentifierNode, IneqNode, Node,...
secoya/hablar.js
src/analysis/constraints.ts
import { ASTRoot } from '../trees/constraint'; import { TypedASTRoot as TextTypedASTRoot } from '../trees/text'; import DeadCodeError from '../errors/dead_code_error'; function isDefiniteReturn(ast: ASTRoot) { for (const node of ast.nodes) { if (node.op !== '!') { return false; } } return true; } /** * F...
secoya/hablar.js
src/parsers/constraint.ts
import { Node } from '../trees/constraint'; import getParser from './get_parser'; const constraintParser = getParser('constraint'); export type ConstraintParserResult = { input: string; nodes: Node[]; }; export default function parse(input: string): ConstraintParserResult { return { input: input, nodes: const...
secoya/hablar.js
src/errors/dead_code_error.ts
import { ASTRoot as ConstraintAST } from '../trees/constraint'; import { TypedASTRoot as TextAST } from '../trees/text'; export default class DeadCodeError extends Error { public message: string; public constructor( message: string, translations: Array<{ constraints: ConstraintAST; translation: TextAST; ...