Skip to content

Commit 12187cb

Browse files
merge: #2841
2841: feat: change interfaces to types for quickinfo r=sprutton1 a=sprutton1 Same as described [here](microsoft/TypeScript#38040), the Typescript system does not extract deep information from `interface`s, so if we want the details on the hover/hotkey, we need them to be `type`s. I have no idea what implications this might have elsewhere, so insight there would be good. Everything seems good in my tests still. Co-authored-by: Scott Prutton <[email protected]>
2 parents 69427f4 + 3a97aae commit 12187cb

File tree

1 file changed

+11
-11
lines changed
  • lib/sdf-server/src/server/service

1 file changed

+11
-11
lines changed

lib/sdf-server/src/server/service/func.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -590,32 +590,32 @@ pub fn compile_return_types(ty: FuncBackendResponseType, kind: FuncBackendKind)
590590
FuncBackendResponseType::String => "type Output = string | null;",
591591
FuncBackendResponseType::Integer => "type Output = number | null;",
592592
FuncBackendResponseType::Qualification => {
593-
"interface Output {
593+
"type Output {
594594
result: 'success' | 'warning' | 'failure';
595595
message?: string | null;
596596
}"
597597
}
598598
FuncBackendResponseType::CodeGeneration => {
599-
"interface Output {
599+
"type Output {
600600
format: string;
601601
code: string;
602602
}"
603603
}
604604
FuncBackendResponseType::Validation => {
605-
"interface Output {
605+
"type Output {
606606
valid: boolean;
607607
message: string;
608608
}"
609609
}
610610
FuncBackendResponseType::Reconciliation => {
611-
"interface Output {
611+
"type Output {
612612
updates: { [key: string]: unknown };
613613
actions: string[];
614614
message: string | null;
615615
}"
616616
}
617617
FuncBackendResponseType::Action => {
618-
"interface Output {
618+
"type Output {
619619
status: 'ok' | 'warning' | 'error';
620620
payload?: { [key: string]: unknown } | null;
621621
message?: string | null;
@@ -651,32 +651,32 @@ pub fn compile_return_types_2(ty: FuncBackendResponseType, kind: FuncBackendKind
651651
FuncBackendResponseType::String => "type Output = string | null;",
652652
FuncBackendResponseType::Integer => "type Output = number | null;",
653653
FuncBackendResponseType::Qualification => {
654-
"interface Output {
654+
"type Output {
655655
result: 'success' | 'warning' | 'failure';
656656
message?: string | null;
657657
}"
658658
}
659659
FuncBackendResponseType::CodeGeneration => {
660-
"interface Output {
660+
"type Output {
661661
format: string;
662662
code: string;
663663
}"
664664
}
665665
FuncBackendResponseType::Validation => {
666-
"interface Output {
666+
"type Output {
667667
valid: boolean;
668668
message: string;
669669
}"
670670
}
671671
FuncBackendResponseType::Reconciliation => {
672-
"interface Output {
672+
"type Output {
673673
updates: { [key: string]: unknown };
674674
actions: string[];
675675
message: string | null;
676676
}"
677677
}
678678
FuncBackendResponseType::Action => {
679-
"interface Output {
679+
"type Output {
680680
status: 'ok' | 'warning' | 'error';
681681
payload?: { [key: string]: unknown } | null;
682682
message?: string | null;
@@ -851,7 +851,7 @@ async fn compile_action_types(
851851
}
852852

853853
Ok(format!(
854-
"interface Input {{
854+
"type Input {{
855855
kind: 'standard';
856856
properties: {};
857857
}}",

0 commit comments

Comments
 (0)