repo
stringlengths
7
64
file_url
stringlengths
81
338
file_path
stringlengths
5
257
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:25:31
2026-01-05 01:50:38
truncated
bool
2 classes
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/combineReducers.ts
src/combineReducers.ts
import type { Action } from './types/actions' import type { ActionFromReducersMapObject, PreloadedStateShapeFromReducersMapObject, Reducer, StateFromReducersMapObject } from './types/reducers' import ActionTypes from './utils/actionTypes' import isPlainObject from './utils/isPlainObject' import warning from '....
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/applyMiddleware.ts
src/applyMiddleware.ts
import compose from './compose' import type { Middleware, MiddlewareAPI } from './types/middleware' import type { StoreEnhancer, Dispatch } from './types/store' /** * Creates a store enhancer that applies middleware to the dispatch method * of the Redux store. This is handy for a variety of tasks, such as expressing...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/kindOf.ts
src/utils/kindOf.ts
// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of export function miniKindOf(val: any): string { if (val === void 0) return 'undefined' if (val === null) return 'null' const type = typeof val switch (type) { case 'boolean': case 'string': case 'number': ca...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/formatProdErrorMessage.ts
src/utils/formatProdErrorMessage.ts
/** * Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js * * Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes * during build. * @param {number} code */ export function formatProdErrorMessage...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/actionTypes.ts
src/utils/actionTypes.ts
/** * These are private action types reserved by Redux. * For any unknown actions, you must return the current state. * If the current state is undefined, you must return the initial state. * Do not reference these action types directly in your code. */ const randomString = () => Math.random().toString(36).subs...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/isPlainObject.ts
src/utils/isPlainObject.ts
/** * @param obj The object to inspect. * @returns True if the argument appears to be a plain object. */ export default function isPlainObject(obj: any): obj is object { if (typeof obj !== 'object' || obj === null) return false let proto = obj while (Object.getPrototypeOf(proto) !== null) { proto = Object...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/symbol-observable.ts
src/utils/symbol-observable.ts
declare global { interface SymbolConstructor { readonly observable: symbol } } const $$observable = /* #__PURE__ */ (() => (typeof Symbol === 'function' && Symbol.observable) || '@@observable')() export default $$observable
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/isAction.ts
src/utils/isAction.ts
import type { Action } from '../types/actions' import isPlainObject from './isPlainObject' export default function isAction(action: unknown): action is Action<string> { return ( isPlainObject(action) && 'type' in action && typeof (action as Record<'type', unknown>).type === 'string' ) }
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/utils/warning.ts
src/utils/warning.ts
/** * Prints a warning in the console if it exists. * * @param message The warning message. */ export default function warning(message: string): void { /* eslint-disable no-console */ if (typeof console !== 'undefined' && typeof console.error === 'function') { console.error(message) } /* eslint-enable n...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/types/actions.ts
src/types/actions.ts
/** * An *action* is a plain object that represents an intention to change the * state. Actions are the only way to get data into the store. Any data, * whether from UI events, network callbacks, or other sources such as * WebSockets needs to eventually be dispatched as actions. * * Actions must have a `type` fie...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/types/middleware.ts
src/types/middleware.ts
import type { Dispatch } from './store' export interface MiddlewareAPI<D extends Dispatch = Dispatch, S = any> { dispatch: D getState: () => S } /** * A middleware is a higher-order function that composes a dispatch function * to return a new dispatch function. It often turns async actions into * actions. * ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/types/store.ts
src/types/store.ts
import type { Action, UnknownAction } from './actions' import type { Reducer } from './reducers' // eslint-disable-next-line @typescript-eslint/no-unused-vars import _$$observable from '../utils/symbol-observable' /** * A *dispatching function* (or simply *dispatch function*) is a function that * accepts an action o...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/src/types/reducers.ts
src/types/reducers.ts
import type { Action, UnknownAction } from './actions' /* reducers */ /** * A *reducer* is a function that accepts * an accumulation and a value and returns a new accumulation. They are used * to reduce a collection of values down to a single value * * Reducers are not unique to Redux—they are a fundamental conc...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/applyMiddleware.spec.ts
test/applyMiddleware.spec.ts
import { createStore, applyMiddleware } from 'redux' import type { Middleware, MiddlewareAPI, Action, Store, Dispatch } from 'redux' import { vi } from 'vitest' import * as reducers from './helpers/reducers' import { addTodo, addTodoAsync, addTodoIfEmpty } from './helpers/actionCreators' import { thunk } from './helper...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/compose.spec.ts
test/compose.spec.ts
import { compose } from '../src' describe('Utils', () => { describe('compose', () => { it('composes from right to left', () => { const double = (x: number) => x * 2 const square = (x: number) => x * x expect(compose(square)(5)).toBe(25) expect(compose(square, double)(5)).toBe(100) e...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/bindActionCreators.spec.ts
test/bindActionCreators.spec.ts
import { bindActionCreators, createStore } from '../src' import type { ActionCreator, Store } from '../src' import { todos } from './helpers/reducers' import * as actionCreators from './helpers/actionCreators' describe('bindActionCreators', () => { let store: Store let actionCreatorFunctions: any beforeEach(() ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/combineReducers.spec.ts
test/combineReducers.spec.ts
/* eslint-disable no-console */ import type { Reducer, Action } from 'redux' import { createStore, combineReducers, __DO_NOT_USE__ActionTypes as ActionTypes } from 'redux' import { vi } from 'vitest' describe('Utils', () => { describe('combineReducers', () => { it('returns a composite reducer that maps the...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/createStore.spec.ts
test/createStore.spec.ts
import type { StoreEnhancer, Action, Store, Reducer } from 'redux' import { createStore, combineReducers } from 'redux' import { vi } from 'vitest' import { addTodo, dispatchInMiddle, getStateInMiddle, subscribeInMiddle, unsubscribeInMiddle, throwError, unknownAction } from './helpers/actionCreators' impo...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/helpers/actionCreators.ts
test/helpers/actionCreators.ts
import { ADD_TODO, DISPATCH_IN_MIDDLE, GET_STATE_IN_MIDDLE, SUBSCRIBE_IN_MIDDLE, UNSUBSCRIBE_IN_MIDDLE, THROW_ERROR, UNKNOWN_ACTION } from './actionTypes' import type { TodoAction } from './reducers' import type { Dispatch } from 'redux' export function addTodo(text: string): TodoAction { return { type...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/helpers/middleware.ts
test/helpers/middleware.ts
import type { Dispatch, Middleware } from 'redux' export const thunk: Middleware<{ <R>(thunk: (dispatch: Dispatch, getState: () => any) => R): R }> = ({ dispatch, getState }) => next => action => typeof action === 'function' ? action(dispatch, getState) : next(action)
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/helpers/actionTypes.ts
test/helpers/actionTypes.ts
export const ADD_TODO = 'ADD_TODO' export const DISPATCH_IN_MIDDLE = 'DISPATCH_IN_MIDDLE' export const GET_STATE_IN_MIDDLE = 'GET_STATE_IN_MIDDLE' export const SUBSCRIBE_IN_MIDDLE = 'SUBSCRIBE_IN_MIDDLE' export const UNSUBSCRIBE_IN_MIDDLE = 'UNSUBSCRIBE_IN_MIDDLE' export const THROW_ERROR = 'THROW_ERROR' export const U...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/helpers/reducers.ts
test/helpers/reducers.ts
import { ADD_TODO, DISPATCH_IN_MIDDLE, GET_STATE_IN_MIDDLE, SUBSCRIBE_IN_MIDDLE, UNSUBSCRIBE_IN_MIDDLE, THROW_ERROR } from './actionTypes' function id(state: { id: number }[]) { return ( state.reduce((result, item) => (item.id > result ? item.id : result), 0) + 1 ) } export interface Todo { id: ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/utils/isAction.spec.ts
test/utils/isAction.spec.ts
import isAction from '@internal/utils/isAction' describe('isAction', () => { it('should only return true for plain objects with a string type property', () => { const actionCreator = () => ({ type: 'anAction' }) class Action { type = 'totally an action' } const testCases: [action: unknown, expe...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/utils/warning.spec.ts
test/utils/warning.spec.ts
/* eslint-disable no-console */ import { vi } from 'vitest' import warning from '@internal/utils/warning' describe('Utils', () => { describe('warning', () => { it('calls console.error when available', () => { const preSpy = console.error const spy = vi.fn() console.error = spy try { ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/utils/formatProdErrorMessage.spec.ts
test/utils/formatProdErrorMessage.spec.ts
import { formatProdErrorMessage } from '@internal/utils/formatProdErrorMessage' describe('formatProdErrorMessage', () => { it('returns message with expected code references', () => { const code = 16 const errorMessage = formatProdErrorMessage(code) expect(errorMessage).toContain(`#${code}`) expect(...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/utils/isPlainObject.spec.ts
test/utils/isPlainObject.spec.ts
import isPlainObject from '@internal/utils/isPlainObject' import vm from 'vm' describe('isPlainObject', () => { it('returns true only if plain object', () => { const sandbox = { fromAnotherRealm: false } vm.runInNewContext('fromAnotherRealm = {}', sandbox) expect(isPlainObject(sandbox.fromAnotherRealm))...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/actionCreators.test-d.ts
test/typescript/actionCreators.test-d.ts
import type { Action, ActionCreator, ActionCreatorsMapObject, Dispatch } from 'redux' import { bindActionCreators } from 'redux' import { addTodo } from '../helpers/actionCreators' interface AddTodoAction extends Action { text: string } declare const dispatch: Dispatch describe('type tests', () => { test...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/compose.test-d.ts
test/typescript/compose.test-d.ts
import { compose } from 'redux' describe('type tests', () => { // adapted from DefinitelyTyped/compose-function const numberToNumber = (a: number): number => a + 2 const numberToString = (a: number): string => 'foo' const stringToNumber = (a: string): number => 5 test('compose', () => { expectTypeOf(...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/actions.test-d.ts
test/typescript/actions.test-d.ts
import type { Action as ReduxAction } from 'redux' describe('type tests', () => { test('FSA', () => { interface Action<P> extends ReduxAction { payload: P } const action: Action<string> = { type: 'ACTION_TYPE', payload: 'test' } expectTypeOf(action.payload).toBeString() }) ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/reducers.test-d.ts
test/typescript/reducers.test-d.ts
import type { Action, AnyAction, PreloadedStateShapeFromReducersMapObject, Reducer, ReducersMapObject } from 'redux' import { combineReducers } from 'redux' describe('type tests', () => { test('AnyAction type is used to allow action property access without requiring type casting.', () => { // Simple re...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/enhancers.test-d.ts
test/typescript/enhancers.test-d.ts
import type { Action, Reducer, StoreEnhancer } from 'redux' import { createStore } from 'redux' interface State { someField: 'string' } const reducer: Reducer<State> = null as any describe('type tests', () => { test('Store enhancer that extends the type of dispatch.', () => { type PromiseDispatch = <T extend...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/dispatch.test-d.ts
test/typescript/dispatch.test-d.ts
import type { Dispatch } from 'redux' describe('type tests', () => { test('default Dispatch type accepts any object with `type` property.', () => { const dispatch: Dispatch = null as any const a = dispatch({ type: 'INCREMENT', count: 10 }) expectTypeOf(a).toHaveProperty('count') expectTypeOf(a).no...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/injectedDispatch.test-d.ts
test/typescript/injectedDispatch.test-d.ts
import type { Action, Dispatch } from 'redux' interface Component<P> { props: P } interface HOC<T> { <P>(wrapped: Component<P & T>): Component<P> } declare function connect<T, D extends Dispatch = Dispatch>( mapDispatchToProps: (dispatch: D) => T ): HOC<T> describe('type tests', () => { test('inject default...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/store.test-d.ts
test/typescript/store.test-d.ts
import type { Action, Observer, Reducer, Store, StoreEnhancer, Unsubscribe } from 'redux' import { combineReducers, createStore } from 'redux' describe('type tests', () => { type BrandedString = string & { _brand: 'type' } const brandedString = 'a string' as BrandedString type State = { a: 'a' ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/test/typescript/middleware.test-d.ts
test/typescript/middleware.test-d.ts
import type { Action, Dispatch, Middleware, MiddlewareAPI, Reducer } from 'redux' import { applyMiddleware, createStore } from 'redux' type PromiseDispatch = <T extends Action>(promise: Promise<T>) => Promise<T> interface Thunk<R, S, DispatchExt = {}> { (dispatch: Dispatch & ThunkDispatch<S> & DispatchExt...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/App.tsx
examples/counter-ts/src/App.tsx
import React from 'react' import { Counter } from './features/counter/Counter' import './App.css' function App() { return ( <div className="App"> <header className="App-header"> <img src={`${process.env.PUBLIC_URL ?? ''}/logo.svg`} className="App-logo" alt="logo" ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/reportWebVitals.ts
examples/counter-ts/src/reportWebVitals.ts
import { ReportHandler } from 'web-vitals' const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry) getFID(onPerfEntry) getFCP(onPerfEntry) ...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/setupTests.ts
examples/counter-ts/src/setupTests.ts
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/App.test.tsx
examples/counter-ts/src/App.test.tsx
import React from 'react' import { render } from '@testing-library/react' import { Provider } from 'react-redux' import { store } from './app/store' import App from './App' test('renders learn react link', () => { const { getByText } = render( <Provider store={store}> <App /> </Provider> ) expect(...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/index.tsx
examples/counter-ts/src/index.tsx
import React from 'react' import { createRoot } from 'react-dom/client' import { Provider } from 'react-redux' import { store } from './app/store' import App from './App' import reportWebVitals from './reportWebVitals' import './index.css' const container = document.getElementById('root')! const root = createRoot(cont...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/react-app-env.d.ts
examples/counter-ts/src/react-app-env.d.ts
/// <reference types="react-scripts" />
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/app/store.ts
examples/counter-ts/src/app/store.ts
import { configureStore, ThunkAction, Action } from '@reduxjs/toolkit' import counterReducer from '../features/counter/counterSlice' export const store = configureStore({ reducer: { counter: counterReducer } }) export type AppDispatch = typeof store.dispatch export type RootState = ReturnType<typeof store.get...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/app/hooks.ts
examples/counter-ts/src/app/hooks.ts
import { useDispatch, useSelector } from 'react-redux' import type { AppDispatch, RootState } from './store' // Use throughout your app instead of plain `useDispatch` and `useSelector` export const useAppDispatch = useDispatch.withTypes<AppDispatch>() export const useAppSelector = useSelector.withTypes<RootState>()
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/features/counter/counterSlice.spec.ts
examples/counter-ts/src/features/counter/counterSlice.spec.ts
import counterReducer, { CounterState, increment, decrement, incrementByAmount } from './counterSlice' describe('counter reducer', () => { const initialState: CounterState = { value: 3, status: 'idle' } it('should handle initial state', () => { expect(counterReducer(undefined, { type: 'unknow...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/features/counter/counterAPI.ts
examples/counter-ts/src/features/counter/counterAPI.ts
// A mock function to mimic making an async request for data export function fetchCount(amount = 1) { return new Promise<{ data: number }>(resolve => setTimeout(() => resolve({ data: amount }), 500) ) }
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/features/counter/counterSlice.ts
examples/counter-ts/src/features/counter/counterSlice.ts
import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit' import { RootState, AppThunk } from '../../app/store' import { fetchCount } from './counterAPI' export interface CounterState { value: number status: 'idle' | 'loading' | 'failed' } const initialState: CounterState = { value: 0, s...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/examples/counter-ts/src/features/counter/Counter.tsx
examples/counter-ts/src/features/counter/Counter.tsx
import React, { useState } from 'react' import { useAppSelector, useAppDispatch } from '../../app/hooks' import { decrement, increment, incrementByAmount, incrementAsync, incrementIfOdd, selectCount } from './counterSlice' import styles from './Counter.module.css' export function Counter() { const count...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
reduxjs/redux
https://github.com/reduxjs/redux/blob/820301a1865c499ae18ca96ffece122790937b56/website/docusaurus.config.ts
website/docusaurus.config.ts
import { resolve } from 'path' import { linkDocblocks, transpileCodeblocks } from 'remark-typescript-tools' import type { Options, ThemeConfig } from '@docusaurus/preset-classic' import type { Config } from '@docusaurus/types' import type { Options as UmamiOptions } from '@dipakparmar/docusaurus-plugin-umami' const co...
typescript
MIT
820301a1865c499ae18ca96ffece122790937b56
2026-01-04T15:28:28.658077Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/tailwind.config.ts
tailwind.config.ts
import preset from "@hoppscotch/ui/ui-preset" export default { content: [ "packages/hoppscotch-common/src/**/*.{vue,html}", "packages/hoppscotch-sh-admin/src/**/*.{vue,html}", "packages/hoppscotch-desktop/src/**/*.{vue,html}", ], presets: [preset], }
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/tailwind.config.ts
packages/hoppscotch-desktop/tailwind.config.ts
import { Config } from "tailwindcss" import preset from "@hoppscotch/ui/ui-preset" export default { content: ["src/**/*.{vue,html}"], presets: [preset], } satisfies Config
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/vite.config.ts
packages/hoppscotch-desktop/vite.config.ts
import { defineConfig } from "vite" import vue from "@vitejs/plugin-vue" import Icons from "unplugin-icons/vite" import IconResolver from "unplugin-icons/resolver" import Components from "unplugin-vue-components/vite" import path from "path" // @ts-expect-error process is a nodejs global const host = process.env.TAURI...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/components.d.ts
packages/hoppscotch-desktop/src/components.d.ts
/* eslint-disable */ // @ts-nocheck // biome-ignore lint: disable // oxlint-disable // ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { HoppButtonPrimary: typeof import(...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/router.ts
packages/hoppscotch-desktop/src/router.ts
import { createRouter, createWebHistory } from "vue-router" import { invoke } from "@tauri-apps/api/core" const router = createRouter({ history: createWebHistory(), routes: [ { path: "/", name: "home", component: async () => { try { const isPortable = await invoke<boolean>("...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/main.ts
packages/hoppscotch-desktop/src/main.ts
import { createApp } from "vue" import App from "./App.vue" import router from "./router" import "@hoppscotch/ui/style.css" import "./assets/scss/styles.scss" import "./assets/scss/tailwind.scss" import "@fontsource-variable/inter" import "@fontsource-variable/material-symbols-rounded" import "@fontsource-variable/rob...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/vite-env.d.ts
packages/hoppscotch-desktop/src/vite-env.d.ts
/// <reference types="vite/client" /> declare module "*.vue" { import type { DefineComponent } from "vue"; const component: DefineComponent<{}, {}, any>; export default component; }
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/services/instance-store-migration.service.ts
packages/hoppscotch-desktop/src/services/instance-store-migration.service.ts
import { BehaviorSubject, Observable } from "rxjs" import { computed } from "vue" import { LazyStore } from "@tauri-apps/plugin-store" import { getInstanceDir, getConfigDir, getStoreDir, getLatestDir, Store, } from "~/kernel/store" import * as E from "fp-ts/Either" import { join } from "@tauri-apps/api/path" ...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/services/persistence.service.ts
packages/hoppscotch-desktop/src/services/persistence.service.ts
import * as E from "fp-ts/Either" import { z } from "zod" import { StoreError } from "@hoppscotch/kernel" import { Store } from "~/kernel/store" import { UpdateState, PortableSettings } from "~/types" export const STORE_NAMESPACE = "hoppscotch-desktop.v1" export const STORE_KEYS = { UPDATE_STATE: "updateState", C...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/services/updater.client.ts
packages/hoppscotch-desktop/src/services/updater.client.ts
import { invoke } from "@tauri-apps/api/core" import { listen, type UnlistenFn } from "@tauri-apps/api/event" export interface UpdateInfo { available: boolean currentVersion: string latestVersion?: string releaseNotes?: string } export interface DownloadProgress { downloaded: number total?: number perce...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/kernel/store.ts
packages/hoppscotch-desktop/src/kernel/store.ts
import type { StorageOptions, StoreError, StoreEvents, StoreEventEmitter, } from "@hoppscotch/kernel" import * as E from "fp-ts/Either" import { getModule } from "." import { invoke } from "@tauri-apps/api/core" import { join } from "@tauri-apps/api/path" const STORE_PATH = "hoppscotch-unified.store" export c...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/kernel/io.ts
packages/hoppscotch-desktop/src/kernel/io.ts
import type { SaveFileWithDialogOptions, OpenExternalLinkOptions, SaveFileResponse, OpenExternalLinkResponse, EventCallback, UnlistenFn, } from "@hoppscotch/kernel" import { getModule } from "." export const Io = (() => { const module = () => getModule("io") return { saveFileWithDialog: ( op...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/kernel/index.ts
packages/hoppscotch-desktop/src/kernel/index.ts
import { KernelAPI } from "@hoppscotch/kernel" export { Io } from "./io" export { Relay } from "./relay" export { Store } from "./store" export const getModule = <K extends keyof KernelAPI>( name: K ): NonNullable<KernelAPI[K]> => { const kernel = window.__KERNEL__ if (!kernel?.[name]) throw new Error(`Kernel $...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/kernel/relay.ts
packages/hoppscotch-desktop/src/kernel/relay.ts
import type { RelayRequest, RelayRequestEvents, RelayError, RelayResponse, RelayEventEmitter, } from "@hoppscotch/kernel" import * as E from "fp-ts/Either" import { getModule } from "." export const Relay = (() => { const module = () => getModule("relay") return { capabilities: () => module().capabi...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/composables/useAppInitialization.ts
packages/hoppscotch-desktop/src/composables/useAppInitialization.ts
import { ref } from "vue" import { load, download, close } from "@hoppscotch/plugin-appload" import { getVersion } from "@tauri-apps/api/app" import { invoke } from "@tauri-apps/api/core" import { DesktopPersistenceService } from "~/services/persistence.service" import { InstanceStoreMigrationService } from "~/service...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/utils/updater.ts
packages/hoppscotch-desktop/src/utils/updater.ts
import { check, type DownloadEvent } from "@tauri-apps/plugin-updater" import { relaunch } from "@tauri-apps/plugin-process" import { type LazyStore } from "@tauri-apps/plugin-store" import { UpdateStatus, CheckResult, UpdateState } from "~/types" export class UpdaterService { private currentProgress: { downloaded: ...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/types/kernel.d.ts
packages/hoppscotch-desktop/src/types/kernel.d.ts
import type { KernelAPI } from "@hoppscotch/kernel" declare global { interface Window { __KERNEL__?: KernelAPI } } export {}
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/src/types/index.ts
packages/hoppscotch-desktop/src/types/index.ts
export interface RecentInstance { url: string lastUsed: string version?: string pinned: boolean } export interface StoreSchema { recentInstances: RecentInstance[] } export enum UpdateStatus { IDLE = "idle", CHECKING = "checking", AVAILABLE = "available", NOT_AVAILABLE = "not_available", DOWNLOADIN...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/dist-js/index.d.ts
export interface DownloadOptions { serverUrl: string; } export interface DownloadResponse { success: boolean; bundleName: string; serverUrl: string; version: string; } export interface WindowOptions { title?: string; width?: number; height?: number; resizable?: boolean; } export inte...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/vite-env.d.ts
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/examples/tauri-app/src/vite-env.d.ts
/// <reference types="svelte" /> /// <reference types="vite/client" />
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/guest-js/index.ts
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-appload/guest-js/index.ts
import { invoke } from "@tauri-apps/api/core" export interface DownloadOptions { serverUrl: string } export interface DownloadResponse { success: boolean bundleName: string serverUrl: string version: string } export interface WindowOptions { title?: string width?: number height?: number resizable?:...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/dist-js/index.d.ts
export type Method = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE"; export type Version = "HTTP/1.0" | "HTTP/1.1" | "HTTP/2.0" | "HTTP/3.0"; export type StatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 226 | 300 | 301 | 302 | 303 | 304 |...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/guest-js/index.ts
packages/hoppscotch-desktop/plugin-workspace/tauri-plugin-relay/guest-js/index.ts
import { invoke } from "@tauri-apps/api/core" export type Method = | "GET" // Retrieve resource | "POST" // Create resource | "PUT" // Replace resource | "DELETE" // Remove resource | "PATCH" // Modify resource | "HEAD" // GET without body | "OPTIONS" // Get allowed methods | "CONNECT" // Create tunnel...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/meta.ts
packages/hoppscotch-common/meta.ts
import { IHTMLTag } from "vite-plugin-html-config" export const APP_INFO = { name: "Hoppscotch", shortDescription: "Open source API development ecosystem", description: "Helps you create requests faster, saving precious time on development.", keywords: "hoppscotch, hopp scotch, hoppscotch online, hopps...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/components.d.ts
packages/hoppscotch-common/src/components.d.ts
/* eslint-disable */ // @ts-nocheck // biome-ignore lint: disable // oxlint-disable // ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 export {} /* prettier-ignore */ declare module 'vue' { export interface GlobalComponents { AccessTokens: typeof import('./co...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/setupTests.ts
packages/hoppscotch-common/src/setupTests.ts
import * as E from "fp-ts/Either" import { expect } from "vitest" globalThis.Worker = class { constructor() {} postMessage = () => {} terminate = () => {} onmessage = null onerror = null } as any expect.extend({ toBeLeft(received, expected) { const { isNot } = this return { pass: E....
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/vite-envs.d.ts
packages/hoppscotch-common/src/vite-envs.d.ts
/// <reference types="vite/client" /> // Environment Variables Intellisense interface ImportMetaEnv { readonly VITE_GA_ID: string readonly VITE_GTM_ID: string readonly VITE_API_KEY: string readonly VITE_AUTH_DOMAIN: string readonly VITE_DATABASE_URL: string readonly VITE_PROJECT_ID: string readonly VIT...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/vitest.d.ts
packages/hoppscotch-common/src/vitest.d.ts
import type { Assertion, AsymmetricMatchersContaining } from "vitest" interface CustomMatchers<R = any> { toBeLeft(expected: unknown): R toBeRight(): R toEqualLeft(expected: unknown): R toSubsetEqualRight(expected: unknown): R } declare module 'vitest' { interface Assertion<T = any> extends CustomMatchers<T...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/index.ts
packages/hoppscotch-common/src/index.ts
import { getKernelMode, initKernel } from "@hoppscotch/kernel" import { HOPP_MODULES } from "@modules/." import { createApp } from "vue" import { loader } from "@guolao/vue-monaco-editor" import * as monaco from "monaco-editor" import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker" import tsWorker...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/shims.d.ts
packages/hoppscotch-common/src/shims.d.ts
/// <reference types="vite/client" /> /// <reference types="vite-plugin-pages/client" /> /// <reference types="unplugin-icons/types/vue" /> // // Hoppscotch Browser Extension interface PWExtensionHook { getVersion: () => { major: number; minor: number } sendRequest: ( req: AxiosRequestConfig & { wantsBinary: b...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/secret-environment.service.ts
packages/hoppscotch-common/src/services/secret-environment.service.ts
import { Container, Service } from "dioc" import { reactive, computed, watch, nextTick } from "vue" /** * Defines a secret environment variable. * Value is the current value of the variable. * InitialValue is the value of the variable when it was created. * VarIndex is the index of the variable in the environment....
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/cookie-jar.service.ts
packages/hoppscotch-common/src/services/cookie-jar.service.ts
import { Service } from "dioc" import { ref } from "vue" import { parseString as setCookieParse } from "set-cookie-parser-es" import { Cookie } from "@hoppscotch/data" export class CookieJarService extends Service { public static readonly ID = "COOKIE_JAR_SERVICE" /** * The cookie jar that stores all relevant ...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/debug.service.ts
packages/hoppscotch-common/src/services/debug.service.ts
import { Service } from "dioc" /** * This service provides debug utilities for the application and is * supposed to be used only in development. * * This service logs events from the container and also events * from all the services that are bound to the container. Along with that * this service exposes all regi...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/documentation.service.ts
packages/hoppscotch-common/src/services/documentation.service.ts
import { Service } from "dioc" import { reactive, computed, ref } from "vue" import { HoppCollection, HoppRESTRequest } from "@hoppscotch/data" import { getUserPublishedDocs, getTeamPublishedDocs, } from "~/helpers/backend/queries/PublishedDocs" import * as E from "fp-ts/Either" // Types for documentation export t...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/banner.service.ts
packages/hoppscotch-common/src/services/banner.service.ts
import { Service } from "dioc" import { computed, ref } from "vue" import { getI18n } from "~/modules/i18n" export const BANNER_PRIORITY_LOW = 1 export const BANNER_PRIORITY_MEDIUM = 3 export const BANNER_PRIORITY_HIGH = 5 export type BannerType = "info" | "warning" | "error" export type BannerContent = { type: Ba...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/scroll.service.ts
packages/hoppscotch-common/src/services/scroll.service.ts
import { Service } from "dioc" /** * Suffix type for different views in the application. * This is used to identify the type of view for which the scroll position is being stored. */ export type Suffix = "json" | "raw" | "html" | "xml" | "preview" /** * This service is used to store and manage scroll positions fo...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/workspace.service.ts
packages/hoppscotch-common/src/services/workspace.service.ts
import { tryOnScopeDispose, useIntervalFn } from "@vueuse/core" import { Service } from "dioc" import { computed, reactive, ref, watch, readonly } from "vue" import { useStreamStatic } from "~/composables/stream" import TeamListAdapter from "~/helpers/teams/TeamListAdapter" import { platform } from "~/platform" import ...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/current-sort.service.ts
packages/hoppscotch-common/src/services/current-sort.service.ts
import { Service } from "dioc" import { cloneDeep } from "lodash-es" import { computed, reactive } from "vue" /** * Defines a sort option. * For now, we only support sorting by name, ascending or descending. * In the future, we can add more sort options like date created, date modified, etc. */ export type Current...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/ui-extension.service.ts
packages/hoppscotch-common/src/services/ui-extension.service.ts
import { Service } from "dioc" import { Component, shallowRef } from "vue" /** * A registrar that allows other services to register * additional stuff into the UI */ export class UIExtensionService extends Service { public static readonly ID = "UI_EXTENSION_SERVICE" /** * Defines the Root UI Extensions that...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/interceptor.service.ts
packages/hoppscotch-common/src/services/interceptor.service.ts
import * as E from "fp-ts/Either" import { Service } from "dioc" import { refWithControl } from "@vueuse/core" import { AxiosRequestConfig, AxiosResponse } from "axios" import type { getI18n } from "~/modules/i18n" import { throwError } from "~/helpers/functional/error" import { Component, MaybeRef, Ref, comput...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/current-environment-value.service.ts
packages/hoppscotch-common/src/services/current-environment-value.service.ts
import { Container, Service } from "dioc" import { cloneDeep } from "lodash-es" import { reactive, computed, watch, nextTick } from "vue" /** * Defines a environment variable. */ export type Variable = { key: string currentValue: string varIndex: number isSecret: boolean } /** * This service is used to sto...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/kernel-interceptor.service.ts
packages/hoppscotch-common/src/services/kernel-interceptor.service.ts
import * as E from "fp-ts/Either" import { Service } from "dioc" import { Component, computed, reactive, watchEffect, markRaw } from "vue" import type { getI18n } from "~/modules/i18n" import { RelayRequest, RelayResponse, RelayError, RelayCapabilities, } from "@hoppscotch/kernel" export function isCancellatio...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/additionalLinks.service.ts
packages/hoppscotch-common/src/services/additionalLinks.service.ts
import { Service } from "dioc" import { Component, ComputedRef, Ref } from "vue" import { getI18n } from "~/modules/i18n" export type Link = { id: string text: (t: ReturnType<typeof getI18n>) => string icon: Component action: { type: "link"; href: string } | { type: "custom"; do: () => void } show?: Computed...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/team-collection.service.ts
packages/hoppscotch-common/src/services/team-collection.service.ts
import * as E from "fp-ts/Either" import { Subscription } from "rxjs" import { HoppCollectionVariable, HoppRESTAuth, HoppRESTHeader, translateToNewRequest, } from "@hoppscotch/data" import { pull, remove } from "lodash-es" import { Subscription as WSubscription } from "wonka" import { RootCollectionsOfTeamDoc...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
true
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/history-ui-provider.service.ts
packages/hoppscotch-common/src/services/history-ui-provider.service.ts
import { Service } from "dioc" import { ref } from "vue" import { getI18n } from "~/modules/i18n" type HistoryUIProviderTitle = (t: ReturnType<typeof getI18n>) => string /** * This service is used to provide custom UI items for the history section. */ export class HistoryUIProviderService extends Service { public...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/initialization.service.ts
packages/hoppscotch-common/src/services/initialization.service.ts
import { Service } from "dioc" import * as E from "fp-ts/Either" import { getService } from "~/modules/dioc" import { PersistenceService } from "~/services/persistence" import { RESTTabService } from "~/services/tab/rest" import { GQLTabService } from "~/services/tab/graphql" import { KernelInterceptorService } from "...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/index.ts
packages/hoppscotch-common/src/services/spotlight/index.ts
import { Service } from "dioc" import { Component, effectScope, reactive, ref, watch, type Ref } from "vue" import { platform } from "~/platform" import { HoppSpotlightSessionEventData } from "~/platform/analytics" /** * Defines how to render the entry text in a Spotlight Search Result */ export type SpotlightResul...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/navigation.searcher.ts
packages/hoppscotch-common/src/services/spotlight/searchers/navigation.searcher.ts
import { Component, markRaw, reactive } from "vue" import { HoppActionWithNoArgs, invokeAction } from "~/helpers/actions" import { getI18n } from "~/modules/i18n" import { SpotlightSearcherResult, SpotlightService } from ".." import { SearchResult, StaticSpotlightSearcherService, } from "./base/static.searcher" im...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/settings.searcher.ts
packages/hoppscotch-common/src/services/spotlight/searchers/settings.searcher.ts
import { Component, computed, markRaw, reactive } from "vue" import { useSetting } from "~/composables/settings" import { invokeAction } from "~/helpers/actions" import { getI18n } from "~/modules/i18n" import { HoppBgColor, applySetting } from "~/newstore/settings" import { SpotlightSearcherResult, SpotlightService } ...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/interceptor.searcher.ts
packages/hoppscotch-common/src/services/spotlight/searchers/interceptor.searcher.ts
import { Ref, computed, effectScope, markRaw, ref, unref, watch } from "vue" import { getI18n } from "~/modules/i18n" import { SpotlightSearcher, SpotlightSearcherResult, SpotlightSearcherSessionState, SpotlightService, } from ".." import { Service } from "dioc" import MiniSearch from "minisearch" import IconC...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts
packages/hoppscotch-common/src/services/spotlight/searchers/collections.searcher.ts
import { Service } from "dioc" import { SpotlightResultTextType, SpotlightSearcher, SpotlightSearcherResult, SpotlightSearcherSessionState, SpotlightService, } from "../" import { Ref, computed, effectScope, markRaw, ref, watch } from "vue" import { getI18n } from "~/modules/i18n" import MiniSearch from "mini...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false
hoppscotch/hoppscotch
https://github.com/hoppscotch/hoppscotch/blob/67dff5fe0f99312690c1cb0059388aee804b30e0/packages/hoppscotch-common/src/services/spotlight/searchers/kernel-interceptor.searcher.ts
packages/hoppscotch-common/src/services/spotlight/searchers/kernel-interceptor.searcher.ts
import { Ref, computed, effectScope, markRaw, ref, unref, watch } from "vue" import { getI18n } from "~/modules/i18n" import { SpotlightSearcher, SpotlightSearcherResult, SpotlightSearcherSessionState, SpotlightService, } from ".." import { Service } from "dioc" import MiniSearch from "minisearch" import IconC...
typescript
MIT
67dff5fe0f99312690c1cb0059388aee804b30e0
2026-01-04T15:25:31.920196Z
false