Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change interfaces to types for quickinfo #2841

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions lib/sdf-server/src/server/service/func.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,32 +590,32 @@ pub fn compile_return_types(ty: FuncBackendResponseType, kind: FuncBackendKind)
FuncBackendResponseType::String => "type Output = string | null;",
FuncBackendResponseType::Integer => "type Output = number | null;",
FuncBackendResponseType::Qualification => {
"interface Output {
"type Output {
result: 'success' | 'warning' | 'failure';
message?: string | null;
}"
}
FuncBackendResponseType::CodeGeneration => {
"interface Output {
"type Output {
format: string;
code: string;
}"
}
FuncBackendResponseType::Validation => {
"interface Output {
"type Output {
valid: boolean;
message: string;
}"
}
FuncBackendResponseType::Reconciliation => {
"interface Output {
"type Output {
updates: { [key: string]: unknown };
actions: string[];
message: string | null;
}"
}
FuncBackendResponseType::Action => {
"interface Output {
"type Output {
status: 'ok' | 'warning' | 'error';
payload?: { [key: string]: unknown } | null;
message?: string | null;
Expand Down Expand Up @@ -651,32 +651,32 @@ pub fn compile_return_types_2(ty: FuncBackendResponseType, kind: FuncBackendKind
FuncBackendResponseType::String => "type Output = string | null;",
FuncBackendResponseType::Integer => "type Output = number | null;",
FuncBackendResponseType::Qualification => {
"interface Output {
"type Output {
result: 'success' | 'warning' | 'failure';
message?: string | null;
}"
}
FuncBackendResponseType::CodeGeneration => {
"interface Output {
"type Output {
format: string;
code: string;
}"
}
FuncBackendResponseType::Validation => {
"interface Output {
"type Output {
valid: boolean;
message: string;
}"
}
FuncBackendResponseType::Reconciliation => {
"interface Output {
"type Output {
updates: { [key: string]: unknown };
actions: string[];
message: string | null;
}"
}
FuncBackendResponseType::Action => {
"interface Output {
"type Output {
status: 'ok' | 'warning' | 'error';
payload?: { [key: string]: unknown } | null;
message?: string | null;
Expand Down Expand Up @@ -855,7 +855,7 @@ async fn compile_action_types(
}

Ok(format!(
"interface Input {{
"type Input {{
kind: 'standard';
properties: {};
}}",
Expand Down