-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4e76530
commit a0f3a2d
Showing
4 changed files
with
37 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# Indicate the index.ts file you have override to redirect to custom interface definition | ||
src/models/base/pet/index.ts |
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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export type { Pet } from './pet'; | ||
export { revivePet } from './pet.reviver'; | ||
export { Pet } from '../../core/pet/pet'; | ||
export { revivePet } from '../../core/pet/pet.reviver'; | ||
|
||
export {Pet as BasePet} from './pet'; | ||
export {revivePet as baseRevivePet} from './pet.reviver'; |
24 changes: 24 additions & 0 deletions
24
packages/@ama-sdk/showcase-sdk/src/models/core/pet/pet.reviver.ts
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,24 @@ | ||
/** | ||
* Reviver: Pet | ||
* | ||
* THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT. | ||
*/ | ||
import { Pet } from './pet'; | ||
import { baseRevivePet } from '../../base'; | ||
import type { ReviverOptions } from '@ama-sdk/core'; | ||
|
||
/** */ | ||
export function revivePet<T extends Pet = Pet>(data: undefined, dictionaries?: any, options?: ReviverOptions): undefined; | ||
export function revivePet(data: Pet, dictionaries?: any, options?: ReviverOptions): Pet ; | ||
export function revivePet(data: any, dictionaries?: any, options?: ReviverOptions): Pet | undefined; | ||
export function revivePet<T extends Pet>(data: T, dictionaries?: any, options?: ReviverOptions): T ; | ||
export function revivePet<T extends Pet>(data: any, dictionaries?: any, options?: ReviverOptions): T | undefined; | ||
/** */ | ||
export function revivePet<T extends Pet = Pet>(data: any, dictionaries?: any, options?: ReviverOptions): T | undefined { | ||
if (!data) { return ; } | ||
data = { | ||
...baseRevivePet(data, dictionaries), | ||
id: data.id || Date.now() | ||
}; | ||
return data as T; | ||
} |
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,7 @@ | ||
import {BasePet} from '../../base/pet'; | ||
|
||
export interface Pet extends BasePet{ | ||
id: number; | ||
} | ||
|
||
|