Comments (2)
Alternatively, if it is possible to simply not return function definitions instead of throwing UnknownTypeError: Unknown type "function""
that would also work for my use case
from ts-json-schema-generator.
This only occured on one file, I don't know why, but I suppose it is practical to just ignore it:
import { type Dispatch, type Middleware, isAction } from '@reduxjs/toolkit'
import objectPath from 'object-path'
import { type ReduxAction, type RootState, isReduxAction } from '../../../lib/types.js'
import viewNamespace from '../../__view/index.js'
import reduxNamespace from '../index.js'
const { setStatePathResult } = viewNamespace.actions
const { _broadcastAllSagasFulfilled } = reduxNamespace.actions
export const stateObjectPathMiddleware: Middleware<unknown, RootState, Dispatch<ReduxAction>> = (storeApi) => (next) => (action) => {
const result = next(action)
let state: RootState | null = null
let statePath: string | null = null
// Set statePath if we need to set the path result
if (isReduxAction(action) && action.type !== setStatePathResult.type) {
statePath = action.meta.selectStatePath
} else if (isAction(action) && action.type === _broadcastAllSagasFulfilled.type) {
// Update the path result to the latest once async work has completed
state = storeApi.getState()
statePath = state.__view.statePath
}
// Set the path result if statePath is set
if (typeof statePath === 'string') {
if (state == null) {
state = storeApi.getState()
}
const pathResult = objectPath.get(state, statePath)
storeApi.dispatch({
...setStatePathResult({ pathResult, statePath }),
meta: {
selectStatePath: null
}
})
}
return result
}
from ts-json-schema-generator.
Related Issues (20)
- Expose parsing of a symbol HOT 1
- Publish NPM release HOT 1
- Imported types are converted into strings in literal expression
- The @discriminator tag does not handle `ref` type discriminators
- Missing $id prefix in $ref HOT 4
- Bun.sh support HOT 2
- Type override when compile same type name from different ts file to one json schema HOT 2
- Prevent simplification of UnionType HOT 1
- Add patterns to object property names HOT 1
- Duplicate (nested) discriminator union values not allowed
- Invalid schema generated with circular dependencies - minimal case
- Errors out with mentions of @types/mocha HOT 1
- Function with generic keyof param crashes HOT 2
- Issue Generating JSON Schema for Types with Indexed Access References HOT 1
- Support @required and $data annotations. HOT 5
- Error: Unknown node "Primitive" (ts.SyntaxKind = 162) in specific Type example HOT 8
- Generate a schema with an enum only includes the enums numeric values HOT 4
- Documentation of annotations ? HOT 1
- Enhancement: support polymorphic arrays
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ts-json-schema-generator.