-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(mvc): refactor to create rendering and content negotiation imple…
…mentation - adds `ObjectRenderer` interface/injectable, `@Renderer()` decorator, and basic renderer implementations closes #24
- Loading branch information
Daniel Schaffer
committed
Mar 1, 2019
1 parent
1c9b070
commit 9c5586b
Showing
28 changed files
with
1,121 additions
and
112 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
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,10 +1,8 @@ | ||
export interface ControllerResult { | ||
readonly resultObject: object; | ||
readonly contentType: string; | ||
readonly headers?: { [key: string]: string }; | ||
readonly value: string | Promise<string>; | ||
readonly data: object | ||
readonly headers?: { [key: string]: string } | ||
} | ||
|
||
export function isControllerResult(obj: any): obj is ControllerResult { | ||
return obj && typeof obj.value !== 'undefined' && typeof obj.contentType === 'string' | ||
return obj && typeof obj.data !== 'undefined' | ||
} |
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
Oops, something went wrong.