-
Notifications
You must be signed in to change notification settings - Fork 442
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Propagate comments from record fields to gentype output (#6333)
* propagate comments from record fields to gentype output * changelog
- Loading branch information
Showing
12 changed files
with
131 additions
and
17 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
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
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
2 changes: 1 addition & 1 deletion
2
jscomp/gentype_tests/typescript-react-example/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
jscomp/gentype_tests/typescript-react-example/src/Comments.bs.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
jscomp/gentype_tests/typescript-react-example/src/Comments.gen.tsx
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,30 @@ | ||
/* TypeScript file generated from Comments.res by genType. */ | ||
/* eslint-disable import/first */ | ||
|
||
|
||
// @ts-ignore: Implicit any on import | ||
import * as CommentsBS__Es6Import from './Comments.bs'; | ||
const CommentsBS: any = CommentsBS__Es6Import; | ||
|
||
// tslint:disable-next-line:interface-over-type-literal | ||
export type DecideSubject_payload = { | ||
/** A hint to use as a guide when thinking of your poem.*/ | ||
readonly hint: string }; | ||
|
||
// tslint:disable-next-line:max-classes-per-file | ||
export abstract class DecideSubject_input { protected opaque!: any }; /* simulate opaque types */ | ||
|
||
// tslint:disable-next-line:interface-over-type-literal | ||
export type DecideSubject_output = { | ||
/** The text of the poem.*/ | ||
readonly text: string; | ||
/** The prompt used to generate the poem.*/ | ||
readonly prompt: string; | ||
/** The system prompt used to generate the poem.*/ | ||
readonly systemPrompt: string | ||
}; | ||
|
||
/** Decide on a subject matter for a poem. */ | ||
export const DecideSubject__placeholder: (run:string, times:number) => void = CommentsBS.DecideSubject._placeholder; | ||
|
||
export const DecideSubject: { _placeholder: (run:string, times:number) => void } = CommentsBS.DecideSubject |
24 changes: 24 additions & 0 deletions
24
jscomp/gentype_tests/typescript-react-example/src/Comments.res
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 @@ | ||
@genType /** A module for deciding on a subject matter for a poem.*/ | ||
module DecideSubject = { | ||
type payload = { | ||
/** A hint to use as a guide when thinking of your poem.*/ | ||
hint: string, | ||
} | ||
/** The input used to generate the prompt and system prompt.*/ | ||
type input | ||
/** The output from evaluating the llm prompt*/ | ||
type output = { | ||
/** The text of the poem.*/ | ||
text: string, | ||
/** The prompt used to generate the poem.*/ | ||
prompt: string, | ||
/** The system prompt used to generate the poem.*/ | ||
systemPrompt: string, | ||
} | ||
|
||
@genType /** Decide on a subject matter for a poem.*/ | ||
let _placeholder = ( | ||
@ocaml.doc("The runner specification") run: string, | ||
@ocaml.doc("The number of times to cycle through the runner") times: int, | ||
) => (run, times)->ignore | ||
} |