mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 06:25:45 +01:00
Implement api for extension point typings (#1638)
Currently, the only way to explore available extension points is through our documentation or by browsing the source code. Once you find them, there is no guard rails and the usage is prone to user errors. This new api allows the declaration of extension points as types in code. This way, exposing an extension point is as easy as exporting it from a module. Both the implementation and the developer who uses the extension point work with the same shared type that allows auto-completion and type-checks for safety. This feature is backwards-compatible as the generic methods all have sensible defaults for the type parameters. Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com> Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
This commit is contained in:
committed by
GitHub
parent
b6b304f338
commit
7286a62a80
@@ -284,7 +284,7 @@ const EXPORT_MEDIA_TYPE = "application/vnd.scmm-repositoryExport+json;v=2";
|
||||
|
||||
export const useExportRepository = () => {
|
||||
const queryClient = useQueryClient();
|
||||
const [intervalId, setIntervalId] = useState<number | undefined>();
|
||||
const [intervalId, setIntervalId] = useState<ReturnType<typeof setTimeout>>();
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
if (intervalId) {
|
||||
|
||||
Reference in New Issue
Block a user