This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: serializable types and optional key for IDependencyInformation
- Loading branch information
Marcel Kloubert
committed
Jan 31, 2024
1 parent
a7275ee
commit dc61b65
Showing
9 changed files
with
312 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// This file is part of the @egomobile/documentation distribution. | ||
// Copyright (c) Next.e.GO Mobile SE, Aachen, Germany (https://e-go-mobile.com/) | ||
// | ||
// @egomobile/documentation is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as | ||
// published by the Free Software Foundation, version 3. | ||
// | ||
// @egomobile/documentation is distributed in the hope that it will be useful, but | ||
// WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
// Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import type { IDependencyInformation } from "../decorators"; | ||
import type { Nullable } from "./internal"; | ||
|
||
/** | ||
* A serizable version of an `IClassDependencyItem`. | ||
*/ | ||
export interface ISerializableClassDependencyItemWithInfo extends ISerializableDependencyItemWithInfo { | ||
/** | ||
* The name of the class. | ||
*/ | ||
name: string; | ||
/** | ||
* The type | ||
*/ | ||
type: "class"; | ||
} | ||
|
||
/** | ||
* A serizable version of an `IDependencyItem`. | ||
*/ | ||
export interface ISerializableDependencyItemWithInfo { | ||
/** | ||
* The underlying information. | ||
*/ | ||
info: IDependencyInformation; | ||
} | ||
|
||
/** | ||
* A serizable version of an `IMethodDependencyItem`. | ||
*/ | ||
export interface ISerializableMethodDependencyItemWithInfo extends ISerializableDependencyItemWithInfo, IWithClassNameProp, IWithIsStaticProp { | ||
/** | ||
* The name of the method. | ||
*/ | ||
name: string; | ||
/** | ||
* The type. | ||
*/ | ||
type: "method"; | ||
} | ||
|
||
/** | ||
* A serizable version of an `IParameterDependencyItem`. | ||
*/ | ||
export interface ISerializableParameterDependencyItemWithInfo extends ISerializableDependencyItemWithInfo, IWithClassNameProp, IWithIsStaticProp { | ||
/** | ||
* The zero-based index inside the method. | ||
*/ | ||
index: number; | ||
/** | ||
* The name, if available. | ||
*/ | ||
name: Nullable<string>; | ||
/** | ||
* The type. | ||
*/ | ||
type: "parameter"; | ||
} | ||
|
||
/** | ||
* A serizable version of an `IPropertyDependencyItem`. | ||
*/ | ||
export interface ISerializablePropertyDependencyItemWithInfo extends ISerializableDependencyItemWithInfo, IWithClassNameProp, IWithIsStaticProp { | ||
/** | ||
* The name of the property. | ||
*/ | ||
name: string; | ||
/** | ||
* The type. | ||
*/ | ||
type: "property"; | ||
} | ||
|
||
/** | ||
* An object with an `className` property. | ||
*/ | ||
export interface IWithClassNameProp { | ||
/** | ||
* The name of the underlying class, if available. | ||
*/ | ||
className: Nullable<string>; | ||
} | ||
|
||
/** | ||
* An object with an `isStatic` property. | ||
*/ | ||
export interface IWithIsStaticProp { | ||
/** | ||
* Is underlying type static or not. | ||
*/ | ||
isStatic: boolean; | ||
} | ||
|
||
/** | ||
* An serializable dependency info item. | ||
*/ | ||
export type SerializableDependencyItem = | ||
ISerializableClassDependencyItemWithInfo | | ||
ISerializableMethodDependencyItemWithInfo | | ||
ISerializableParameterDependencyItemWithInfo | | ||
ISerializablePropertyDependencyItemWithInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.