diff --git a/examples/tests/sdk_tests/fs/yaml.main.w b/examples/tests/sdk_tests/fs/yaml.main.w index fa7ab573e22..62bf87d2d81 100644 --- a/examples/tests/sdk_tests/fs/yaml.main.w +++ b/examples/tests/sdk_tests/fs/yaml.main.w @@ -8,13 +8,6 @@ let data = Json { "arr": [1, 2, 3, "test", { "foo": "bar" }] }; -try { - fs.writeFile(filepath, "invalid: {{ content }}, invalid"); - fs.readYaml(filepath); -} catch e { - assert(regex.match("^bad indentation", e) == true); -} - fs.writeYaml(filepath, data, data); assert(fs.exists(filepath) == true); diff --git a/libs/wingc/src/docs.rs b/libs/wingc/src/docs.rs index 01b5f9d9c43..1bf5b1977f4 100644 --- a/libs/wingc/src/docs.rs +++ b/libs/wingc/src/docs.rs @@ -3,15 +3,19 @@ use std::collections::BTreeMap; use itertools::Itertools; use crate::{ - ast::Phase, + ast::{AccessModifier, Phase, Symbol}, closure_transform::CLOSURE_CLASS_PREFIX, jsify::codemaker::CodeMaker, type_check::{ jsii_importer::is_construct_base, Class, ClassLike, Enum, FunctionSignature, Interface, Namespace, Struct, - SymbolKind, Type, TypeRef, VariableInfo, VariableKind, + SymbolKind, Type, TypeRef, VariableInfo, VariableKind, CLASS_INFLIGHT_INIT_NAME, CLASS_INIT_NAME, }, }; +const FIELD_HEADER: &'static str = "### Fields"; +const METHOD_HEADER: &'static str = "### Methods"; +const PARAMETER_HEADER: &'static str = "### Parameters"; + #[derive(Debug, Default, Clone)] pub struct Docs { pub summary: Option, @@ -120,31 +124,29 @@ impl Documented for VariableInfo { markdown.line("```wing"); markdown.line(format!("{name_str}: {}", self.type_)); - if let Some(d) = &self.docs { - markdown.line("```"); - - markdown.line("---"); + let type_docs = self.type_.render_docs(); - if let Some(summary) = &d.summary { - markdown.line(summary); - markdown.empty_line(); + if !type_docs.is_empty() { + if type_docs.starts_with("```wing") { + // skip the first line to combine the code block + markdown.line(type_docs.lines().skip(1).join("\n")); + } else { + markdown.line("```"); + markdown.line("---"); + markdown.line(type_docs); } - - render_docs(&mut markdown, d); } else { - let type_docs = self.type_.render_docs(); - - if !type_docs.is_empty() { - if type_docs.starts_with("```wing") { - // skip the first line to combine the code block - markdown.line(type_docs.lines().skip(1).join("\n")); - } else { - markdown.line("```"); - markdown.line("---"); - markdown.line(type_docs); + markdown.line("```"); + + if let Some(d) = &self.docs { + markdown.line("---"); + + if let Some(summary) = &d.summary { + markdown.line(summary); + markdown.empty_line(); } - } else { - markdown.line("```"); + + render_docs(&mut markdown, d); } } @@ -207,6 +209,38 @@ fn render_docs(markdown: &mut CodeMaker, docs: &Docs) { } } +fn render_signature_help(f: &FunctionSignature) -> String { + let mut markdown = CodeMaker::default(); + + for (param_idx, param) in f.parameters.iter().enumerate() { + let param_type = param.typeref; + let param_type_unwrapped = param.typeref.maybe_unwrap_option(); + let is_last = param_idx == f.parameters.len() - 1; + + let param_name: &String = ¶m.name; + let detail_text = if let Some(summary) = ¶m.docs.summary { + format!("— `{param_type}` — {summary}") + } else { + format!("— `{param_type}`") + }; + + if !is_last || !param_type_unwrapped.is_struct() { + markdown.line(format!("- `{param_name}` {detail_text}")); + } else { + markdown.line(format!("- `...{param_name}` {detail_text}")); + + let structy = param_type_unwrapped.as_struct().unwrap(); + let struct_text = render_classlike_members(structy); + + markdown.indent(); + markdown.line(struct_text.replace(FIELD_HEADER, "")); + markdown.unindent(); + } + } + + markdown.to_string().trim().to_string() +} + fn render_function(f: &FunctionSignature) -> String { let mut markdown = CodeMaker::default(); @@ -214,19 +248,9 @@ fn render_function(f: &FunctionSignature) -> String { markdown.line(s); } - if has_parameters_documentation(f) { - markdown.empty_line(); - markdown.line("### Parameters"); - - for p in &f.parameters { - let summary = if let Some(s) = &p.docs.summary { - format!(" — {}", s) - } else { - String::default() - }; - - markdown.line(format!("- `{}`{}", p.name, summary)); - } + if f.parameters.len() > 0 { + markdown.line(PARAMETER_HEADER); + markdown.line(render_signature_help(f)); } render_docs(&mut markdown, &f.docs); @@ -234,10 +258,6 @@ fn render_function(f: &FunctionSignature) -> String { markdown.to_string().trim().to_string() } -fn has_parameters_documentation(f: &FunctionSignature) -> bool { - f.parameters.iter().any(|p| p.docs.summary.is_some()) -} - fn render_struct(s: &Struct) -> String { let mut markdown = CodeMaker::default(); @@ -257,25 +277,7 @@ fn render_struct(s: &Struct) -> String { markdown.line(s); } - if s.fields(true).count() > 0 { - markdown.line("### Fields"); - } - - for field in s.env.iter(true) { - let Some(variable) = field.1.as_variable() else { - continue; - }; - let optional = if variable.type_.is_option() { "?" } else { "" }; - markdown.line(&format!( - "- `{}{optional}` — {}\n", - field.0, - variable - .docs - .as_ref() - .and_then(|d| d.summary.clone()) - .unwrap_or(format!("{}", variable.type_)) - )); - } + markdown.line(render_classlike_members(s)); render_docs(&mut markdown, &s.docs); @@ -307,21 +309,7 @@ fn render_interface(i: &Interface) -> String { markdown.line(s); } - if i.env.iter(true).next().is_some() { - markdown.line("### Methods"); - } - - for prop in i.env.iter(true) { - let prop_docs = prop - .1 - .as_variable() - .and_then(|v| v.docs.as_ref().and_then(|d| d.summary.clone())); - markdown.line(&format!( - "- `{}` — {}\n", - prop.0, - prop_docs.unwrap_or(format!("`{}`", prop.1.as_variable().unwrap().type_)) - )); - } + markdown.line(render_classlike_members(i)); markdown.empty_line(); @@ -393,10 +381,80 @@ fn render_class(c: &Class) -> String { } render_docs(&mut markdown, &c.docs); - // if let Some(initializer) = c.get_init() { - // let rfn = initializer.render_docs(); - // markdown.line(rfn); - // } + if matches!(c.phase, Phase::Preflight | Phase::Independent) { + if let Some(initializer) = c.get_method(&Symbol::global(CLASS_INIT_NAME)) { + let function_sig = initializer.type_.as_function_sig().unwrap(); + if function_sig.parameters.len() > 0 { + markdown.line("### Initializer"); + markdown.line(render_signature_help(&function_sig)); + } + } + } + + if let Some(initializer) = c.get_method(&Symbol::global(CLASS_INFLIGHT_INIT_NAME)) { + let function_sig = initializer.type_.as_function_sig().unwrap(); + if function_sig.parameters.len() > 0 { + markdown.line("### Initializer (`inflight`)"); + markdown.line(render_signature_help(&function_sig)); + } + } + + markdown.line(render_classlike_members(c)); + + markdown.to_string().trim().to_string() +} + +fn render_classlike_members(classlike: &impl ClassLike) -> String { + let mut field_markdown = CodeMaker::default(); + let mut method_markdown = CodeMaker::default(); + + let public_member_variables = classlike + .get_env() + .iter(true) + .flat_map(|f| if f.2.init { None } else { f.1.as_variable() }) + .filter(|v| v.access_modifier == AccessModifier::Public) + // show optionals first, then sort alphabetically by name + .sorted_by(|a, b| { + let a_is_option = a.type_.is_option(); + let b_is_option = b.type_.is_option(); + a_is_option + .cmp(&b_is_option) + .then_with(|| a.name.name.cmp(&b.name.name)) + }) + .collect_vec(); + + for member in public_member_variables { + let member_type = member.type_; + let option_text = if member_type.is_option() { "?" } else { "" }; + let member_name = &member.name.name; + let member_docs = member.docs.as_ref().and_then(|d| d.summary.clone()); + let text = if let Some(member_docs) = member_docs { + format!("- `{member_name}{option_text}` — `{member_type}` — {member_docs}") + } else { + format!("- `{member_name}{option_text}` — `{member_type}`") + }; + + if member_type.maybe_unwrap_option().is_function_sig() { + if member.name.name == CLASS_INIT_NAME || member.name.name == CLASS_INFLIGHT_INIT_NAME { + continue; + } + + method_markdown.line(text); + } else { + field_markdown.line(text); + } + } + + let mut markdown = CodeMaker::default(); + + if !field_markdown.is_empty() { + markdown.line(FIELD_HEADER); + markdown.add_code(field_markdown); + } + if !method_markdown.is_empty() { + markdown.line(METHOD_HEADER); + markdown.add_code(method_markdown); + } markdown.to_string().trim().to_string() } diff --git a/libs/wingc/src/jsify/codemaker.rs b/libs/wingc/src/jsify/codemaker.rs index a46ed10614a..0cf35dff7f5 100644 --- a/libs/wingc/src/jsify/codemaker.rs +++ b/libs/wingc/src/jsify/codemaker.rs @@ -70,6 +70,11 @@ impl CodeMaker { code.line(s); code } + + /// Checks if there are no lines of code + pub fn is_empty(&self) -> bool { + self.lines.is_empty() + } } impl ToString for CodeMaker { diff --git a/libs/wingc/src/lsp/completions.rs b/libs/wingc/src/lsp/completions.rs index 19d46f23618..aebdcd13ec4 100644 --- a/libs/wingc/src/lsp/completions.rs +++ b/libs/wingc/src/lsp/completions.rs @@ -7,7 +7,8 @@ use std::cmp::max; use tree_sitter::{Node, Point}; use crate::ast::{ - CalleeKind, Expr, ExprKind, Phase, Scope, Symbol, TypeAnnotation, TypeAnnotationKind, UserDefinedType, + AccessModifier, CalleeKind, Expr, ExprKind, Phase, Reference, Scope, Symbol, TypeAnnotation, TypeAnnotationKind, + UserDefinedType, }; use crate::closure_transform::{CLOSURE_CLASS_PREFIX, PARENT_THIS_NAME}; use crate::diagnostic::{WingLocation, WingSpan}; @@ -224,7 +225,18 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse return vec![]; } - let mut completions = get_completions_from_type(&nearest_expr_type, &types, Some(found_env.phase), true); + let access_context = if let ExprKind::Reference(Reference::Identifier(ident)) = &nearest_expr.kind { + match ident.name.as_str() { + "this" => ObjectAccessContext::This, + "super" => ObjectAccessContext::Super, + _ => ObjectAccessContext::Outside, + } + } else { + ObjectAccessContext::Outside + }; + + let mut completions = + get_completions_from_type(&nearest_expr_type, &types, Some(found_env.phase), &access_context); if nearest_expr_type.is_option() { // check to see if we need to add a ? to the completion let replace_node = if node_to_complete_kind == "." { @@ -290,7 +302,12 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse let type_lookup = resolve_user_defined_type(udt, &found_env, scope_visitor.found_stmt_index.unwrap_or(0)); let completions = if let Ok(type_lookup) = type_lookup { - get_completions_from_type(&type_lookup, &types, Some(found_env.phase), false) + get_completions_from_type( + &type_lookup, + &types, + Some(found_env.phase), + &ObjectAccessContext::Static, + ) } else { // this is probably a namespace, let's look it up if let Some(namespace) = root_env @@ -319,8 +336,12 @@ pub fn on_completion(params: lsp_types::CompletionParams) -> CompletionResponse .ok() { let completions = match lookup_thing { - SymbolKind::Type(t) => get_completions_from_type(&t, &types, Some(found_env.phase), false), - SymbolKind::Variable(v) => get_completions_from_type(&v.type_, &types, Some(found_env.phase), false), + SymbolKind::Type(t) => { + get_completions_from_type(&t, &types, Some(found_env.phase), &ObjectAccessContext::Static) + } + SymbolKind::Variable(v) => { + get_completions_from_type(&v.type_, &types, Some(found_env.phase), &ObjectAccessContext::Static) + } SymbolKind::Namespace(n) => { // If the types in this namespace aren't loaded yet, load them now to get completions if !n.loaded { @@ -694,7 +715,11 @@ fn completion_sort_text(completion_item: &CompletionItem) -> String { } else { "z" }; - format!("{}|{}", letter, completion_item.label) + format!( + "{}|{}", + letter, + completion_item.sort_text.as_ref().unwrap_or(&completion_item.label) + ) } /// Create completion for fields within a struct. @@ -706,13 +731,15 @@ fn get_inner_struct_completions(struct_: &Struct, existing_fields: &Vec) if !existing_fields.contains(&field_data.0) { if let Some(mut base_completion) = format_symbol_kind_as_completion(&field_data.0, &field_data.1) { let v = field_data.1.as_variable().unwrap(); + let is_optional = v.type_.is_option(); + if v.type_.maybe_unwrap_option().is_struct() { base_completion.insert_text = Some(format!("{}: {{\n$1\n}}", field_data.0)); } else { base_completion.insert_text = Some(format!("{}: $1", field_data.0)); } - base_completion.label = format!("{}:", base_completion.label); + base_completion.label = format!("{}{}:", base_completion.label, if is_optional { "?" } else { "" }); base_completion.kind = Some(CompletionItemKind::FIELD); base_completion.insert_text_format = Some(InsertTextFormat::SNIPPET); base_completion.command = Some(Command { @@ -720,6 +747,11 @@ fn get_inner_struct_completions(struct_: &Struct, existing_fields: &Vec) command: "editor.action.triggerSuggest".to_string(), arguments: None, }); + base_completion.sort_text = if is_optional { + Some(format!("b|{}", base_completion.label)) + } else { + Some(format!("a|{}", base_completion.label)) + }; completions.push(base_completion); } } @@ -727,19 +759,29 @@ fn get_inner_struct_completions(struct_: &Struct, existing_fields: &Vec) return completions; } +#[derive(Debug)] +enum ObjectAccessContext { + Outside, + This, + Super, + Static, +} + /// Gets accessible properties on a type as a list of CompletionItems fn get_completions_from_type( type_: &TypeRef, types: &Types, current_phase: Option, - is_instance: bool, + access_context: &ObjectAccessContext, ) -> Vec { let type_ = *type_.maybe_unwrap_option(); let type_ = &*types.maybe_unwrap_inference(type_); match type_ { - Type::Class(c) => get_completions_from_class(c, current_phase, is_instance), - Type::Interface(i) => get_completions_from_class(i, current_phase, is_instance), - Type::Struct(s) if is_instance => get_completions_from_class(s, current_phase, is_instance), + Type::Class(c) => get_completions_from_class(c, current_phase, access_context), + Type::Interface(i) => get_completions_from_class(i, current_phase, access_context), + Type::Struct(s) if !matches!(access_context, ObjectAccessContext::Static) => { + get_completions_from_class(s, current_phase, access_context) + } Type::Enum(enum_) => { let variants = &enum_.values; variants @@ -752,7 +794,7 @@ fn get_completions_from_type( }) .collect() } - Type::Optional(t) => get_completions_from_type(t, types, current_phase, is_instance), + Type::Optional(t) => get_completions_from_type(t, types, current_phase, access_context), Type::Void | Type::Function(_) | Type::Anything | Type::Unresolved | Type::Inferred(_) => vec![], Type::Number | Type::String @@ -789,7 +831,12 @@ fn get_completions_from_type( let fqn = format!("{WINGSDK_ASSEMBLY_NAME}.{final_type_name}"); if let LookupResult::Found(std_type, _) = types.libraries.lookup_nested_str(fqn.as_str(), None) { - return get_completions_from_type(&std_type.as_type().expect("is type"), types, current_phase, is_instance); + return get_completions_from_type( + &std_type.as_type().expect("is type"), + types, + current_phase, + access_context, + ); } else { vec![] } @@ -809,7 +856,11 @@ fn get_completions_from_namespace( if let SymbolKind::Type(typeref) = kind { let util_class = typeref.as_class(); if let Some(util_class) = util_class { - util_completions.extend(get_completions_from_class(util_class, current_phase, false)); + util_completions.extend(get_completions_from_class( + util_class, + current_phase, + &ObjectAccessContext::Static, + )); } } } @@ -827,7 +878,7 @@ fn get_completions_from_namespace( fn get_completions_from_class( class: &impl ClassLike, current_phase: Option, - is_instance: bool, + access_context: &ObjectAccessContext, ) -> Vec { class .get_env() @@ -842,8 +893,28 @@ fn get_completions_from_class( .as_variable() .expect("Symbols in classes are always variables"); + match access_context { + // hide private and protected members when accessing from outside the class + ObjectAccessContext::Outside => { + if matches!( + variable.access_modifier, + AccessModifier::Private | AccessModifier::Protected + ) { + return None; + } + } + // hide private members when accessing from inside the class with "super" + ObjectAccessContext::Super => { + if matches!(variable.access_modifier, AccessModifier::Private) { + return None; + } + } + // Don't hide anything when accessing from inside the class with "this" + ObjectAccessContext::This | ObjectAccessContext::Static => {} + } + // don't show static members if we're looking for instance members, and vice versa - if matches!(variable.kind, VariableKind::StaticMember) == is_instance { + if matches!(variable.kind, VariableKind::StaticMember) != matches!(access_context, ObjectAccessContext::Static) { return None; } @@ -1653,4 +1724,32 @@ S. "#, assert!(!struct_static.is_empty()) ); + + test_completion_list!( + hide_private, + r#" +class S { + a: num; + init() { this.a = 2; } +} +let x = new S(); +x. +//^ +"#, + assert!(!hide_private.iter().any(|c| c.label == "a")) + ); + + test_completion_list!( + show_private, + r#" +class S { + a: num; + init() { + this. + //^ + } +} +"#, + assert!(show_private.iter().any(|c| c.label == "a")) + ); } diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap index c1dfba583d9..2650fdd97df 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\na: str\n```" - sortText: "ab|a:" + sortText: "ab|a|a:" insertText: "a: $1" insertTextFormat: 2 command: @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(condition: bool): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" sortText: cc|assert insertText: assert($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(message: str): void" documentation: kind: markdown - value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n\n### Parameters\n- `message` — The message to log" + value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n### Parameters\n- `message` — `str` — The message to log" sortText: cc|log insertText: log($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n\n### Parameters\n- `value` — The value to cast into a different type" + value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" sortText: cc|unsafeCast insertText: unsafeCast($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "preflight (arg1: A): void" documentation: kind: markdown - value: "```wing\npreflight x: preflight (arg1: A): void\n```" + value: "```wing\npreflight x: preflight (arg1: A): void\n```\n---\n### Parameters\n- `...arg1` — `A`\n \n - `a` — `str`" sortText: cc|x insertText: x($0) insertTextFormat: 2 @@ -65,7 +65,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct A\n```\n---\n### Fields\n- `a` — str" + value: "```wing\nstruct A\n```\n---\n### Fields\n- `a` — `str`" sortText: hh|A - label: "inflight () => {}" kind: 15 diff --git a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap index 06b7fefd55a..bc02436c146 100644 --- a/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap +++ b/libs/wingc/src/lsp/snapshots/completions/call_struct_expansion_partial.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ntwo: str\n```" - sortText: "ab|two:" + sortText: "ab|a|two:" insertText: "two: $1" insertTextFormat: 2 command: @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(condition: bool): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" sortText: cc|assert insertText: assert($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(message: str): void" documentation: kind: markdown - value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n\n### Parameters\n- `message` — The message to log" + value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n### Parameters\n- `message` — `str` — The message to log" sortText: cc|log insertText: log($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n\n### Parameters\n- `value` — The value to cast into a different type" + value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" sortText: cc|unsafeCast insertText: unsafeCast($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "preflight (arg1: A): void" documentation: kind: markdown - value: "```wing\npreflight x: preflight (arg1: A): void\n```" + value: "```wing\npreflight x: preflight (arg1: A): void\n```\n---\n### Parameters\n- `...arg1` — `A`\n \n - `one` — `str`\n - `two` — `str`" sortText: cc|x insertText: x($0) insertTextFormat: 2 @@ -65,7 +65,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct A\n```\n---\n### Fields\n- `one` — str\n- `two` — str" + value: "```wing\nstruct A\n```\n---\n### Fields\n- `one` — `str`\n- `two` — `str`" sortText: hh|A - label: "inflight () => {}" kind: 15 diff --git a/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap b/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap index 641fe4e6f1b..8187acb1d05 100644 --- a/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap +++ b/libs/wingc/src/lsp/snapshots/completions/capture_in_test.snap @@ -6,14 +6,14 @@ source: libs/wingc/src/lsp/completions.rs detail: Node documentation: kind: markdown - value: "```wing\npreflight node: Node\n```\n---\nThe tree node." + value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(deps: Array?): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." sortText: ab|node - label: delete kind: 2 detail: "inflight (key: str, opts: BucketDeleteOptions?): void" documentation: kind: markdown - value: "```wing\ninflight delete: inflight (key: str, opts: BucketDeleteOptions?): void\n```\n---\nDelete an existing object using a key from the bucket." + value: "```wing\ninflight delete: inflight (key: str, opts: BucketDeleteOptions?): void\n```\n---\nDelete an existing object using a key from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...opts` — `BucketDeleteOptions?` — Options available for delete an item from a bucket.\n \n - `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -25,7 +25,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): bool" documentation: kind: markdown - value: "```wing\ninflight exists: inflight (key: str): bool\n```\n---\nCheck if an object exists in the bucket." + value: "```wing\ninflight exists: inflight (key: str): bool\n```\n---\nCheck if an object exists in the bucket.\n### Parameters\n- `key` — `str` — Key of the object." sortText: ff|exists insertText: exists($0) insertTextFormat: 2 @@ -37,7 +37,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): str" documentation: kind: markdown - value: "```wing\ninflight get: inflight (key: str): str\n```\n---\nRetrieve an object from the bucket.\n\n\n*@Returns* *the object's body.*\n*@Throws* *if no object with the given key exists.*" + value: "```wing\ninflight get: inflight (key: str): str\n```\n---\nRetrieve an object from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n\n*@Returns* *the object's body.*\n*@Throws* *if no object with the given key exists.*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): Json" documentation: kind: markdown - value: "```wing\ninflight getJson: inflight (key: str): Json\n```\n---\nRetrieve a Json object from the bucket.\n\n\n*@Returns* *the object's parsed Json.*\n*@Throws* *if no object with the given key exists.*" + value: "```wing\ninflight getJson: inflight (key: str): Json\n```\n---\nRetrieve a Json object from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n\n*@Returns* *the object's parsed Json.*\n*@Throws* *if no object with the given key exists.*" sortText: ff|getJson insertText: getJson($0) insertTextFormat: 2 @@ -61,7 +61,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (prefix: str?): Array" documentation: kind: markdown - value: "```wing\ninflight list: inflight (prefix: str?): Array\n```\n---\nRetrieve existing objects keys from the bucket.\n\n\n### Returns\na list of keys or an empty array if the bucket is empty." + value: "```wing\ninflight list: inflight (prefix: str?): Array\n```\n---\nRetrieve existing objects keys from the bucket.\n### Parameters\n- `prefix` — `str?` — Limits the response to keys that begin with the specified prefix.\n\n### Returns\na list of keys or an empty array if the bucket is empty." sortText: ff|list insertText: list($0) insertTextFormat: 2 @@ -73,7 +73,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): ObjectMetadata" documentation: kind: markdown - value: "```wing\ninflight metadata: inflight (key: str): ObjectMetadata\n```\n---\nGet the metadata of an object in the bucket.\n\n\n*@Throws* *if there is no object with the given key.*" + value: "```wing\ninflight metadata: inflight (key: str): ObjectMetadata\n```\n---\nGet the metadata of an object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n\n*@Throws* *if there is no object with the given key.*" sortText: ff|metadata insertText: metadata($0) insertTextFormat: 2 @@ -85,7 +85,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): str" documentation: kind: markdown - value: "```wing\ninflight publicUrl: inflight (key: str): str\n```\n---\nReturns a url to the given file.\n\n\n*@Throws* *if the file is not public or if object does not exist.*" + value: "```wing\ninflight publicUrl: inflight (key: str): str\n```\n---\nReturns a url to the given file.\n### Parameters\n- `key` — `str`\n\n*@Throws* *if the file is not public or if object does not exist.*" sortText: ff|publicUrl insertText: publicUrl($0) insertTextFormat: 2 @@ -97,7 +97,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, body: str): void" documentation: kind: markdown - value: "```wing\ninflight put: inflight (key: str, body: str): void\n```\n---\nPut an object in the bucket." + value: "```wing\ninflight put: inflight (key: str, body: str): void\n```\n---\nPut an object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `body` — `str` — Content of the object we want to store into the bucket." sortText: ff|put insertText: put($0) insertTextFormat: 2 @@ -109,7 +109,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, body: Json): void" documentation: kind: markdown - value: "```wing\ninflight putJson: inflight (key: str, body: Json): void\n```\n---\nPut a Json object in the bucket." + value: "```wing\ninflight putJson: inflight (key: str, body: Json): void\n```\n---\nPut a Json object in the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `body` — `Json` — Json object that we want to store into the bucket." sortText: ff|putJson insertText: putJson($0) insertTextFormat: 2 @@ -121,7 +121,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str, options: SignedUrlOptions?): str" documentation: kind: markdown - value: "```wing\ninflight signedUrl: inflight (key: str, options: SignedUrlOptions?): str\n```\n---\nReturns a signed url to the given file.\n\n\n### Returns\nA string representing the signed url of the object which can be used to download in any downstream system\n\n*@Throws* *if object does not exist.*" + value: "```wing\ninflight signedUrl: inflight (key: str, options: SignedUrlOptions?): str\n```\n---\nReturns a signed url to the given file.\n### Parameters\n- `key` — `str` — The key to access the cloud object.\n- `...options` — `SignedUrlOptions?` — The signedUrlOptions where you can provide the configurations of the signed url.\n \n - `duration?` — `duration?` — The duration for the signed url to expire.\n\n### Returns\nA string representing the signed url of the object which can be used to download in any downstream system\n\n*@Throws* *if object does not exist.*" sortText: ff|signedUrl insertText: signedUrl($0) insertTextFormat: 2 @@ -133,7 +133,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): bool" documentation: kind: markdown - value: "```wing\ninflight tryDelete: inflight (key: str): bool\n```\n---\nDelete an object from the bucket if it exists.\n\n\n### Returns\nthe result of the delete operation" + value: "```wing\ninflight tryDelete: inflight (key: str): bool\n```\n---\nDelete an object from the bucket if it exists.\n### Parameters\n- `key` — `str` — Key of the object.\n\n### Returns\nthe result of the delete operation" sortText: ff|tryDelete insertText: tryDelete($0) insertTextFormat: 2 @@ -145,7 +145,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): str?" documentation: kind: markdown - value: "```wing\ninflight tryGet: inflight (key: str): str?\n```\n---\nGet an object from the bucket if it exists.\n\n\n### Returns\nthe contents of the object as a string if it exists, nil otherwise" + value: "```wing\ninflight tryGet: inflight (key: str): str?\n```\n---\nGet an object from the bucket if it exists.\n### Parameters\n- `key` — `str` — Key of the object.\n\n### Returns\nthe contents of the object as a string if it exists, nil otherwise" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -157,7 +157,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (key: str): Json?" documentation: kind: markdown - value: "```wing\ninflight tryGetJson: inflight (key: str): Json?\n```\n---\nGets an object from the bucket if it exists, parsing it as Json.\n\n\n### Returns\nthe contents of the object as Json if it exists, nil otherwise" + value: "```wing\ninflight tryGetJson: inflight (key: str): Json?\n```\n---\nGets an object from the bucket if it exists, parsing it as Json.\n### Parameters\n- `key` — `str` — Key of the object.\n\n### Returns\nthe contents of the object as Json if it exists, nil otherwise" sortText: ff|tryGetJson insertText: tryGetJson($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/empty.snap b/libs/wingc/src/lsp/snapshots/completions/empty.snap index 96216aeee2c..83aeff2ae63 100644 --- a/libs/wingc/src/lsp/snapshots/completions/empty.snap +++ b/libs/wingc/src/lsp/snapshots/completions/empty.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(condition: bool): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" sortText: cc|assert insertText: assert($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(message: str): void" documentation: kind: markdown - value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n\n### Parameters\n- `message` — The message to log" + value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n### Parameters\n- `message` — `str` — The message to log" sortText: cc|log insertText: log($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n\n### Parameters\n- `value` — The value to cast into a different type" + value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" sortText: cc|unsafeCast insertText: unsafeCast($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/hide_private.snap b/libs/wingc/src/lsp/snapshots/completions/hide_private.snap new file mode 100644 index 00000000000..3ca5ade7841 --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/completions/hide_private.snap @@ -0,0 +1,31 @@ +--- +source: libs/wingc/src/lsp/completions.rs +--- +- label: node + kind: 5 + detail: Node + documentation: + kind: markdown + value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(deps: Array?): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." + sortText: ab|node +- label: bind + kind: 2 + detail: "preflight (host: IInflightHost, ops: Array): void" + documentation: + kind: markdown + value: "```wing\npreflight bind: preflight (host: IInflightHost, ops: Array): void\n```\n---\nBinds the resource to the host so that it can be used by inflight code.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nYou can override this method to perform additional logic like granting\nIAM permissions to the host based on what methods are being called. But\nyou must call `super.bind(host, ops)` to ensure that the resource is\nactually bound." + sortText: ff|bind + insertText: bind($0) + insertTextFormat: 2 + command: + title: triggerParameterHints + command: editor.action.triggerParameterHints +- label: toString + kind: 2 + detail: "preflight (): str" + documentation: + kind: markdown + value: "```wing\npreflight toString: preflight (): str\n```\n---\nReturns a string representation of this construct." + sortText: ff|toString + insertText: toString() + diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap index 80b0373fb22..eb81741684c 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_if_statement.snap @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Map" documentation: kind: markdown - value: "```wing\ncopy: (): Map\n```\n---\nCreate an immutable shallow copy of this map.\n\n\n### Returns\nan ImmutableMap with the same values as this map" + value: "```wing\ncopy: (): Map\n```\n---\nCreate an immutable shallow copy of this map.\n\n### Returns\nan ImmutableMap with the same values as this map" sortText: ff|copy insertText: copy() - label: delete @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\ndelete: (key: str): bool\n```\n---\nRemoves the specified element from a map.\n\n\n### Returns\ntrue if the given key is no longer present" + value: "```wing\ndelete: (key: str): bool\n```\n---\nRemoves the specified element from a map.\n### Parameters\n- `key` — `str` — The key.\n\n### Returns\ntrue if the given key is no longer present" sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -34,7 +34,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): T1" documentation: kind: markdown - value: "```wing\nget: (key: str): T1\n```\n---\nReturns a specified element from the map.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found\n\n### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." + value: "```wing\nget: (key: str): T1\n```\n---\nReturns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found\n\n### Remarks\nIf the value that is associated to the provided key is an object, then you will get a reference\nto that object and any change made to that object will effectively modify it inside the map." sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -46,7 +46,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): bool" documentation: kind: markdown - value: "```wing\nhas: (key: str): bool\n```\n---\nReturns a boolean indicating whether an element with the specified key exists or not.\n\n\n### Returns\ntrue if an element with the specified key exists in the map; otherwise false." + value: "```wing\nhas: (key: str): bool\n```\n---\nReturns a boolean indicating whether an element with the specified key exists or not.\n### Parameters\n- `key` — `str` — The key of the element to test for presence.\n\n### Returns\ntrue if an element with the specified key exists in the map; otherwise false." sortText: ff|has insertText: has($0) insertTextFormat: 2 @@ -58,7 +58,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Array" documentation: kind: markdown - value: "```wing\nkeys: (): Array\n```\n---\nReturns the keys of this map.\n\n\n### Returns\nan array containing the keys of this map" + value: "```wing\nkeys: (): Array\n```\n---\nReturns the keys of this map.\n\n### Returns\nan array containing the keys of this map" sortText: ff|keys insertText: keys() - label: set @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str, value: T1): void" documentation: kind: markdown - value: "```wing\nset: (key: str, value: T1): void\n```\n---\nAdds or updates an entry in a Map object with a specified key and a value.\n\n\n### Remarks\nTODO: revisit this macro after we support indexed args https://github.com/winglang/wing/issues/1659" + value: "```wing\nset: (key: str, value: T1): void\n```\n---\nAdds or updates an entry in a Map object with a specified key and a value.\n### Parameters\n- `key` — `str` — The key of the element to add.\n- `value` — `T1` — The value of the element to add.\n\n### Remarks\nTODO: revisit this macro after we support indexed args https://github.com/winglang/wing/issues/1659" sortText: ff|set insertText: set($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nsize: (): num\n```\n---\nReturns the number of elements in the map.\n\n\n### Returns\nThe number of elements in map\n\n### Remarks\nTODO: For now this has to be a method rather than a getter as macros only work on methods https://github.com/winglang/wing/issues/1658" + value: "```wing\nsize: (): num\n```\n---\nReturns the number of elements in the map.\n\n### Returns\nThe number of elements in map\n\n### Remarks\nTODO: For now this has to be a method rather than a getter as macros only work on methods https://github.com/winglang/wing/issues/1658" sortText: ff|size insertText: size() - label: tryGet @@ -86,7 +86,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): T1?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): T1?\n```\n---\nOptionally returns a specified element from the map.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\ntryGet: (key: str): T1?\n```\n---\nOptionally returns a specified element from the map.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -98,7 +98,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): Array" documentation: kind: markdown - value: "```wing\nvalues: (): Array\n```\n---\nReturns the values of this map.\n\n\n### Returns\nan array containing of type T the values of this map" + value: "```wing\nvalues: (): Array\n```\n---\nReturns the values of this map.\n\n### Returns\nan array containing of type T the values of this map" sortText: ff|values insertText: values() diff --git a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap index 1e7bfa13719..898440d17d3 100644 --- a/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/incomplete_inflight_namespace.snap @@ -5,79 +5,79 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations." + value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiConnectProps?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiDeleteProps?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiGetProps?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiHeadProps?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiOptionsProps?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPatchProps?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPostProps?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPutProps?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter." + value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain." + value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Domain - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function." + value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str): void`\n- `...props` — `FunctionProps?`\n \n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed." + value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `env?` — `Map?`\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?`\n - `memory?` — `num?`\n - `timeout?` — `duration?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue." + value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerProps?): Function` — Create a function to consume messages from this queue.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule." + value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickProps?): Function` — Create a function that runs when receiving the scheduled event.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret." + value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service." + value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic." + value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageProps?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (message: str): void` — Publish message to topic.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website." + value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?`\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — File's content type." + value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." sortText: hh|AddFileOptions - label: ApiConnectProps kind: 22 @@ -89,7 +89,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers.\n- `maxAge?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `Array?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 @@ -131,7 +131,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 @@ -143,25 +143,25 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `body?` — The request's body.\n- `headers?` — The request's headers.\n- `method` — The request's HTTP method.\n- `path` — The request's path.\n- `query` — The request's query string values.\n- `vars` — The path variables." + value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — The response's body.\n- `headers?` — The response's headers.\n- `status` — The response's status code." + value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `status` — `num` — The response's status code.\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — The bucket key that triggered the event.\n- `type` — Type of event." + value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." sortText: hh|BucketEvent - label: BucketOnCreateProps kind: 22 @@ -191,97 +191,97 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." sortText: hh|BucketProps - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — The initial value of the counter." + value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." sortText: hh|CounterProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — The website's custom domain name." + value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." sortText: hh|DomainProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — Environment variables to pass to the function.\n- `logRetentionDays?` — Specifies the number of days that function logs will be kept.\n- `memory?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `contentType?` — The content type of the object, if it is known.\n- `lastModified` — The time the object was last modified.\n- `size` — The size of the object in bytes." + value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — Map?\n- `executeAfter?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — `Map?`\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — How long a queue retains a message.\n- `timeout?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." sortText: hh|QueueProps - label: QueueSetConsumerProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — The maximum number of messages to send to subscribers at once.\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|QueueSetConsumerProps - label: ScheduleOnTickProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ScheduleOnTickProps - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — The secret's name." + value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." sortText: hh|SecretProps - label: ServiceOnStartProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ServiceOnStartProps - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — Whether the service should start automatically.\n- `env?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." sortText: hh|ServiceProps - label: SignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — The duration for the signed url to expire." + value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — `duration?` — The duration for the signed url to expire." sortText: hh|SignedUrlOptions - label: TopicOnMessageProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|TopicOnMessageProps - label: TopicProps kind: 22 @@ -293,13 +293,13 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — Domain?\n- `path` — Local path to the website's static files, relative to the Wing source file or absolute." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?`" sortText: hh|WebsiteProps - label: IApiClient kind: 8 @@ -311,55 +311,55 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — Delete an existing object using a key from the bucket.\n- `exists` — Check if an object exists in the bucket.\n- `get` — Retrieve an object from the bucket.\n- `getJson` — Retrieve a Json object from the bucket.\n- `list` — Retrieve existing objects keys from the bucket.\n- `metadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — Returns a url to the given file.\n- `put` — Put an object in the bucket.\n- `putJson` — Put a Json object in the bucket.\n- `signedUrl` — Returns a signed url to the given file.\n- `tryDelete` — Delete an object from the bucket if it exists.\n- `tryGet` — Get an object from the bucket if it exists.\n- `tryGetJson` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — Decrement the counter, returning the previous value.\n- `inc` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — Get the current value of the counter.\n- `set` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." sortText: ii|ICounterClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — Invokes the function with a payload and waits for the result." + value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 @@ -371,31 +371,31 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — Retrieve the approximate number of messages in the queue.\n- `pop` — Pop a message from the queue.\n- `purge` — Purge all of the messages in the queue.\n- `push` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 @@ -407,73 +407,73 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — Retrieve the value of the secret.\n- `valueJson` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — Start the service.\n- `started` — Indicates whether the service is started.\n- `stop` — Stop the service." + value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service starts.\n- `node` — `Node`" + value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — Handler to run when the service starts." + value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `preflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service stops.\n- `node` — `Node`" + value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — Handler to run when the service stops." + value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — Publish message to topic." + value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (message: str): void` — Publish message to topic." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Methods\n- `url` — The website URL." + value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap b/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap index 7bf67c5b1fd..47d293bb9fa 100644 --- a/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap +++ b/libs/wingc/src/lsp/snapshots/completions/json_literal_cast_inner.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ndurationThing: duration\n```" - sortText: "ab|durationThing:" + sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 command: diff --git a/libs/wingc/src/lsp/snapshots/completions/json_statics.snap b/libs/wingc/src/lsp/snapshots/completions/json_statics.snap index a1131411b5b..2387bf6b10d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/json_statics.snap +++ b/libs/wingc/src/lsp/snapshots/completions/json_statics.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n\n\n### Returns\nthe immutable copy of the Json" + value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n\n\n### Returns\nthe mutable copy of the Json" + value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json." + value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n\n\n### Returns\nthe entries as Array" + value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, key: str): bool" documentation: kind: markdown - value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `json` — `Json` — The json object to inspect.\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n\n\n### Returns\nthe keys as Array" + value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n\n\n### Returns\nJson representation of the string" + value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($0) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($0) insertTextFormat: 2 @@ -114,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n\n\n### Returns\nthe values as Array" + value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" sortText: ff|values insertText: values($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap index 9837555d6ce..721714ac7d9 100644 --- a/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/mut_json_methods.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|asStr insertText: asStr() - label: get @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): MutJson" documentation: kind: markdown - value: "```wing\nget: (key: str): MutJson\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget: (key: str): MutJson\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): MutJson" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): MutJson\n```\n---\nReturns a specified element at a given index from MutJson Array.\n\n\n### Returns\nThe element at given index in MutJson Array\n\n*@throws* *index out of bounds error if the given index does not exist for the MutJson Array*" + value: "```wing\ngetAt: (index: num): MutJson\n```\n---\nReturns a specified element at a given index from MutJson Array.\n### Parameters\n- `index` — `num` — The index of the element in the MutJson Array to return.\n\n### Returns\nThe element at given index in MutJson Array\n\n*@throws* *index out of bounds error if the given index does not exist for the MutJson Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str, value: MutJson): void" documentation: kind: markdown - value: "```wing\nset: (key: str, value: MutJson): void\n```\n---\nAdds or updates an element in MutJson with a specific key and value." + value: "```wing\nset: (key: str, value: MutJson): void\n```\n---\nAdds or updates an element in MutJson with a specific key and value.\n### Parameters\n- `key` — `str` — The key of the element to add.\n- `value` — `MutJson` — The value of the element to add." sortText: ff|set insertText: set($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num, value: MutJson): void" documentation: kind: markdown - value: "```wing\nsetAt: (index: num, value: MutJson): void\n```\n---\nSet element in MutJson Array with a specific key and value." + value: "```wing\nsetAt: (index: num, value: MutJson): void\n```\n---\nSet element in MutJson Array with a specific key and value.\n### Parameters\n- `index` — `num`\n- `value` — `MutJson` — The value of the element to set." sortText: ff|setAt insertText: setAt($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -86,7 +86,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -94,7 +94,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): MutJson?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): MutJson?\n```\n---\nOptionally returns an specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\ntryGet: (key: str): MutJson?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -114,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): MutJson?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): MutJson?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ntryGetAt: (index: num): MutJson?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap index 61ee9893690..882ad6cf39b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_inflight.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight delete: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a DELETE request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call" + value: "```wing\nstatic inflight delete: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a DELETE request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the DELETE request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the DELETE request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight fetch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a HTTP request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call\n\n### Remarks\nThis method allows various HTTP methods based on the provided options.\n\n*@throws* *Only throws if there is a networking error*" + value: "```wing\nstatic inflight fetch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a HTTP request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the HTTP request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call\n\n### Remarks\nThis method allows various HTTP methods based on the provided options.\n\n*@throws* *Only throws if there is a networking error*" sortText: ff|fetch insertText: fetch($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: Url, options: FormatUrlOptions?): str" documentation: kind: markdown - value: "```wing\nstatic inflight formatUrl: inflight (url: Url, options: FormatUrlOptions?): str\n```\n---\nSerializes an URL Struct to a String.\n\n\n### Returns\nA formatted URL String.\n\n*@throws* *Will throw an error if the input URL has invalid fields.*" + value: "```wing\nstatic inflight formatUrl: inflight (url: Url, options: FormatUrlOptions?): str\n```\n---\nSerializes an URL Struct to a String.\n### Parameters\n- `url` — `Url` — The URL Struct to be formatted.\n- `...options` — `FormatUrlOptions?`\n \n - `auth?` — `bool?` — Whether the formatted URL should include the username and password.\n - `fragment?` — `bool?` — Whether the formatted URL should include the fragment identifier.\n - `search?` — `bool?` — Whether the formatted URL should include the search query.\n - `unicode?` — `bool?` — Whether the formatted URL should represent Unicode characters for the host component.\n\n### Returns\nA formatted URL String.\n\n*@throws* *Will throw an error if the input URL has invalid fields.*" sortText: ff|formatUrl insertText: formatUrl($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight get: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a GET request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call" + value: "```wing\nstatic inflight get: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a GET request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the GET request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the GET request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (urlString: str): Url" documentation: kind: markdown - value: "```wing\nstatic inflight parseUrl: inflight (urlString: str): Url\n```\n---\nParses the input URL String using WHATWG URL API and returns an URL Struct.\n\n\n### Returns\nAn URL Struct.\n\n*@throws* *Will throw an error if the input String is not a valid URL.*" + value: "```wing\nstatic inflight parseUrl: inflight (urlString: str): Url\n```\n---\nParses the input URL String using WHATWG URL API and returns an URL Struct.\n### Parameters\n- `urlString` — `str` — The URL String to be parsed.\n\n### Returns\nAn URL Struct.\n\n*@throws* *Will throw an error if the input String is not a valid URL.*" sortText: ff|parseUrl insertText: parseUrl($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight patch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PATCH request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call" + value: "```wing\nstatic inflight patch: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PATCH request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the PATCH request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the PATCH request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" sortText: ff|patch insertText: patch($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight post: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a POST request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call" + value: "```wing\nstatic inflight post: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a POST request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the POST request.\n- `...options` — `RequestOptions?` — Optional parameters for customizing the POST request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" sortText: ff|post insertText: post($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "inflight (url: str, options: RequestOptions?): Response" documentation: kind: markdown - value: "```wing\nstatic inflight put: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PUT request to a specified URL and provides a formatted response.\n\n\n### Returns\nthe formatted response of the call" + value: "```wing\nstatic inflight put: inflight (url: str, options: RequestOptions?): Response\n```\n---\nExecutes a PUT request to a specified URL and provides a formatted response.\n### Parameters\n- `url` — `str` — The target URL for the PUT request.\n- `...options` — `RequestOptions?` — ptional parameters for customizing the PUT request.\n \n - `body?` — `str?` — Any body that you want to add to your request.\n - `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n - `headers?` — `Map?` — Any headers you want to add to your request.\n - `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n - `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n - `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL.\n\n### Returns\nthe formatted response of the call" sortText: ff|put insertText: put($0) insertTextFormat: 2 @@ -101,31 +101,31 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Util\n```\n---\nThe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources." + value: "```wing\nclass Util\n```\n---\nThe Http class is used for calling different HTTP methods and requesting and sending information online, as well as testing public accessible resources.\n\n### Methods\n- `delete` — `inflight (url: str, options: RequestOptions?): Response` — Executes a DELETE request to a specified URL and provides a formatted response.\n- `fetch` — `inflight (url: str, options: RequestOptions?): Response` — Executes a HTTP request to a specified URL and provides a formatted response.\n- `formatUrl` — `inflight (url: Url, options: FormatUrlOptions?): str` — Serializes an URL Struct to a String.\n- `get` — `inflight (url: str, options: RequestOptions?): Response` — Executes a GET request to a specified URL and provides a formatted response.\n- `parseUrl` — `inflight (urlString: str): Url` — Parses the input URL String using WHATWG URL API and returns an URL Struct.\n- `patch` — `inflight (url: str, options: RequestOptions?): Response` — Executes a PATCH request to a specified URL and provides a formatted response.\n- `post` — `inflight (url: str, options: RequestOptions?): Response` — Executes a POST request to a specified URL and provides a formatted response.\n- `put` — `inflight (url: str, options: RequestOptions?): Response` — Executes a PUT request to a specified URL and provides a formatted response." sortText: gg|Util - label: FormatUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct FormatUrlOptions\n```\n---\nOptions for serializing a WHATWG URL to a String.\n### Fields\n- `auth?` — Whether the formatted URL should include the username and password.\n- `fragment?` — Whether the formatted URL should include the fragment identifier.\n- `search?` — Whether the formatted URL should include the search query.\n- `unicode?` — Whether the formatted URL should represent Unicode characters for the host component." + value: "```wing\nstruct FormatUrlOptions\n```\n---\nOptions for serializing a WHATWG URL to a String.\n### Fields\n- `auth?` — `bool?` — Whether the formatted URL should include the username and password.\n- `fragment?` — `bool?` — Whether the formatted URL should include the fragment identifier.\n- `search?` — `bool?` — Whether the formatted URL should include the search query.\n- `unicode?` — `bool?` — Whether the formatted URL should represent Unicode characters for the host component." sortText: hh|FormatUrlOptions - label: RequestOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — Any body that you want to add to your request.\n- `cache?` — The cache mode you want to use for the request.\n- `headers?` — Any headers you want to add to your request.\n- `method?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — The redirect mode to use: follow, error.\n- `referrer?` — A string specifying \"no-referrer\", client, or a URL." + value: "```wing\nstruct RequestOptions\n```\n---\nAn object containing any custom settings that you want to apply to the request.\n### Fields\n- `body?` — `str?` — Any body that you want to add to your request.\n- `cache?` — `RequestCache?` — The cache mode you want to use for the request.\n- `headers?` — `Map?` — Any headers you want to add to your request.\n- `method?` — `HttpMethod?` — The request method, e.g., GET, POST. The default is GET.\n- `redirect?` — `RequestRedirect?` — The redirect mode to use: follow, error.\n- `referrer?` — `str?` — A string specifying \"no-referrer\", client, or a URL." sortText: hh|RequestOptions - label: Response kind: 22 documentation: kind: markdown - value: "```wing\nstruct Response\n```\n---\nThe response to a HTTP request.\n### Fields\n- `body?` — A string representation of the body contents.\n- `headers` — The map of header information associated with the response.\n- `ok` — A boolean indicating whether the response was successful (status in the range 200 – 299) or not.\n- `status` — The status code of the response.\n- `url` — The URL of the response." + value: "```wing\nstruct Response\n```\n---\nThe response to a HTTP request.\n### Fields\n- `headers` — `Map` — The map of header information associated with the response.\n- `ok` — `bool` — A boolean indicating whether the response was successful (status in the range 200 – 299) or not.\n- `status` — `num` — The status code of the response.\n- `url` — `str` — The URL of the response.\n- `body?` — `str?` — A string representation of the body contents." sortText: hh|Response - label: Url kind: 22 documentation: kind: markdown - value: "```wing\nstruct Url\n```\n---\nAn URL following WHATWG URL Standard.\n### Fields\n- `hash` — The URL's fragment.\n- `host` — The URL's host.\n- `hostname` — The URL's hostname.\n- `href` — The entire URL.\n- `origin` — The URL's origin.\n- `password` — The URL’s password.\n- `pathname` — The URL's pathname.\n- `port` — The URL's port.\n- `protocol` — The URL's protocol.\n- `search` — The URL's search.\n- `username` — The URL's username." + value: "```wing\nstruct Url\n```\n---\nAn URL following WHATWG URL Standard.\n### Fields\n- `hash` — `str` — The URL's fragment.\n- `host` — `str` — The URL's host.\n- `hostname` — `str` — The URL's hostname.\n- `href` — `str` — The entire URL.\n- `origin` — `str` — The URL's origin.\n- `password` — `str` — The URL’s password.\n- `pathname` — `str` — The URL's pathname.\n- `port` — `str` — The URL's port.\n- `protocol` — `str` — The URL's protocol.\n- `search` — `str` — The URL's search.\n- `username` — `str` — The URL's username." sortText: hh|Url - label: HttpMethod kind: 13 diff --git a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap index 1e7bfa13719..898440d17d3 100644 --- a/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap +++ b/libs/wingc/src/lsp/snapshots/completions/namespace_middle_dot.snap @@ -5,79 +5,79 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations." + value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiConnectProps?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiDeleteProps?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiGetProps?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiHeadProps?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiOptionsProps?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPatchProps?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPostProps?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPutProps?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter." + value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain." + value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Domain - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function." + value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str): void`\n- `...props` — `FunctionProps?`\n \n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed." + value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `env?` — `Map?`\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?`\n - `memory?` — `num?`\n - `timeout?` — `duration?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue." + value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerProps?): Function` — Create a function to consume messages from this queue.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule." + value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickProps?): Function` — Create a function that runs when receiving the scheduled event.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret." + value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service." + value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic." + value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageProps?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (message: str): void` — Publish message to topic.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website." + value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?`\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — File's content type." + value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." sortText: hh|AddFileOptions - label: ApiConnectProps kind: 22 @@ -89,7 +89,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers.\n- `maxAge?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `Array?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 @@ -131,7 +131,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 @@ -143,25 +143,25 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `body?` — The request's body.\n- `headers?` — The request's headers.\n- `method` — The request's HTTP method.\n- `path` — The request's path.\n- `query` — The request's query string values.\n- `vars` — The path variables." + value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — The response's body.\n- `headers?` — The response's headers.\n- `status` — The response's status code." + value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `status` — `num` — The response's status code.\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — The bucket key that triggered the event.\n- `type` — Type of event." + value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." sortText: hh|BucketEvent - label: BucketOnCreateProps kind: 22 @@ -191,97 +191,97 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." sortText: hh|BucketProps - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — The initial value of the counter." + value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." sortText: hh|CounterProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — The website's custom domain name." + value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." sortText: hh|DomainProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — Environment variables to pass to the function.\n- `logRetentionDays?` — Specifies the number of days that function logs will be kept.\n- `memory?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `contentType?` — The content type of the object, if it is known.\n- `lastModified` — The time the object was last modified.\n- `size` — The size of the object in bytes." + value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — Map?\n- `executeAfter?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — `Map?`\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — How long a queue retains a message.\n- `timeout?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." sortText: hh|QueueProps - label: QueueSetConsumerProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — The maximum number of messages to send to subscribers at once.\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|QueueSetConsumerProps - label: ScheduleOnTickProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ScheduleOnTickProps - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — The secret's name." + value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." sortText: hh|SecretProps - label: ServiceOnStartProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ServiceOnStartProps - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — Whether the service should start automatically.\n- `env?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." sortText: hh|ServiceProps - label: SignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — The duration for the signed url to expire." + value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — `duration?` — The duration for the signed url to expire." sortText: hh|SignedUrlOptions - label: TopicOnMessageProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|TopicOnMessageProps - label: TopicProps kind: 22 @@ -293,13 +293,13 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — Domain?\n- `path` — Local path to the website's static files, relative to the Wing source file or absolute." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?`" sortText: hh|WebsiteProps - label: IApiClient kind: 8 @@ -311,55 +311,55 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — Delete an existing object using a key from the bucket.\n- `exists` — Check if an object exists in the bucket.\n- `get` — Retrieve an object from the bucket.\n- `getJson` — Retrieve a Json object from the bucket.\n- `list` — Retrieve existing objects keys from the bucket.\n- `metadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — Returns a url to the given file.\n- `put` — Put an object in the bucket.\n- `putJson` — Put a Json object in the bucket.\n- `signedUrl` — Returns a signed url to the given file.\n- `tryDelete` — Delete an object from the bucket if it exists.\n- `tryGet` — Get an object from the bucket if it exists.\n- `tryGetJson` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — Decrement the counter, returning the previous value.\n- `inc` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — Get the current value of the counter.\n- `set` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." sortText: ii|ICounterClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — Invokes the function with a payload and waits for the result." + value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 @@ -371,31 +371,31 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — Retrieve the approximate number of messages in the queue.\n- `pop` — Pop a message from the queue.\n- `purge` — Purge all of the messages in the queue.\n- `push` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 @@ -407,73 +407,73 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — Retrieve the value of the secret.\n- `valueJson` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — Start the service.\n- `started` — Indicates whether the service is started.\n- `stop` — Stop the service." + value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service starts.\n- `node` — `Node`" + value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — Handler to run when the service starts." + value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `preflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service stops.\n- `node` — `Node`" + value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — Handler to run when the service stops." + value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — Publish message to topic." + value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (message: str): void` — Publish message to topic." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Methods\n- `url` — The website URL." + value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap b/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap index 7bf67c5b1fd..47d293bb9fa 100644 --- a/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap +++ b/libs/wingc/src/lsp/snapshots/completions/nested_json_literal_cast_inner.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ndurationThing: duration\n```" - sortText: "ab|durationThing:" + sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 command: diff --git a/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap b/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap index 7bf67c5b1fd..47d293bb9fa 100644 --- a/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap +++ b/libs/wingc/src/lsp/snapshots/completions/nested_struct_literal.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ndurationThing: duration\n```" - sortText: "ab|durationThing:" + sortText: "ab|a|durationThing:" insertText: "durationThing: $1" insertTextFormat: 2 command: diff --git a/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap b/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap index 0b73b7d42d4..44f7f02a2ef 100644 --- a/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap +++ b/libs/wingc/src/lsp/snapshots/completions/new_expression_nested.snap @@ -5,7 +5,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations." + value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiConnectProps?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiDeleteProps?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiGetProps?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiHeadProps?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiOptionsProps?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPatchProps?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPostProps?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPutProps?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Api insertText: Api($0) insertTextFormat: 2 @@ -16,7 +16,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: gg|Bucket insertText: Bucket($0) insertTextFormat: 2 @@ -27,7 +27,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter." + value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Counter insertText: Counter($0) insertTextFormat: 2 @@ -38,7 +38,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain." + value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Domain insertText: Domain($0) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function." + value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str): void`\n- `...props` — `FunctionProps?`\n \n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Function insertText: Function($0) insertTextFormat: 2 @@ -60,7 +60,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed." + value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `env?` — `Map?`\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?`\n - `memory?` — `num?`\n - `timeout?` — `duration?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|OnDeploy insertText: OnDeploy($0) insertTextFormat: 2 @@ -71,7 +71,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue." + value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerProps?): Function` — Create a function to consume messages from this queue.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Queue insertText: Queue($0) insertTextFormat: 2 @@ -82,7 +82,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule." + value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickProps?): Function` — Create a function that runs when receiving the scheduled event.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Schedule insertText: Schedule($0) insertTextFormat: 2 @@ -93,7 +93,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret." + value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: gg|Secret insertText: Secret($0) insertTextFormat: 2 @@ -104,7 +104,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service." + value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Service insertText: Service($0) insertTextFormat: 2 @@ -115,7 +115,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic." + value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageProps?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (message: str): void` — Publish message to topic.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Topic insertText: Topic($0) insertTextFormat: 2 @@ -126,7 +126,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website." + value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?`\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Website insertText: Website($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap index cfbc9e7a024..1d925a1868b 100644 --- a/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap +++ b/libs/wingc/src/lsp/snapshots/completions/only_show_symbols_in_scope.snap @@ -20,7 +20,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(condition: bool): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" sortText: cc|assert insertText: assert($0) insertTextFormat: 2 @@ -32,7 +32,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(message: str): void" documentation: kind: markdown - value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n\n### Parameters\n- `message` — The message to log" + value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n### Parameters\n- `message` — `str` — The message to log" sortText: cc|log insertText: log($0) insertTextFormat: 2 @@ -44,7 +44,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n\n### Parameters\n- `value` — The value to cast into a different type" + value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" sortText: cc|unsafeCast insertText: unsafeCast($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap index ecb1f8b952d..b12ec69dd96 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|asStr insertText: asStr() - label: get @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -62,7 +62,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -70,7 +70,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap index b346a58a3e7..0ea7892344d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap +++ b/libs/wingc/src/lsp/snapshots/completions/optional_chaining_auto.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|asBool insertText: asBool() additionalTextEdits: @@ -23,7 +23,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|asNum insertText: asNum() additionalTextEdits: @@ -40,7 +40,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|asStr insertText: asStr() additionalTextEdits: @@ -57,7 +57,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 @@ -99,7 +99,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() additionalTextEdits: @@ -116,7 +116,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() additionalTextEdits: @@ -133,7 +133,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() additionalTextEdits: @@ -150,7 +150,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -171,7 +171,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap index ecb1f8b952d..b12ec69dd96 100644 --- a/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/parentheses_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool" documentation: kind: markdown - value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\nasBool: (): bool\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|asBool insertText: asBool() - label: asNum @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num" documentation: kind: markdown - value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\nasNum: (): num\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|asNum insertText: asNum() - label: asStr @@ -22,7 +22,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\nasStr: (): str\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|asStr insertText: asStr() - label: get @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json" documentation: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" sortText: ff|get insertText: get($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json" documentation: kind: markdown - value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" + value: "```wing\ngetAt: (index: num): Json\n```\n---\nReturns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array\n\n*@throws* *index out of bounds error if the given index does not exist for the Json Array*" sortText: ff|getAt insertText: getAt($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): bool?" documentation: kind: markdown - value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n\n### Returns\na boolean." + value: "```wing\ntryAsBool: (): bool?\n```\n---\nConvert Json element to boolean if possible.\n\n### Returns\na boolean." sortText: ff|tryAsBool insertText: tryAsBool() - label: tryAsNum @@ -62,7 +62,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): num?" documentation: kind: markdown - value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n\n### Returns\na number." + value: "```wing\ntryAsNum: (): num?\n```\n---\nConvert Json element to number if possible.\n\n### Returns\na number." sortText: ff|tryAsNum insertText: tryAsNum() - label: tryAsStr @@ -70,7 +70,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str?" documentation: kind: markdown - value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n\n### Returns\na string." + value: "```wing\ntryAsStr: (): str?\n```\n---\nConvert Json element to string if possible.\n\n### Returns\na string." sortText: ff|tryAsStr insertText: tryAsStr() - label: tryGet @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(key: str): Json?" documentation: kind: markdown - value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" + value: "```wing\ntryGet: (key: str): Json?\n```\n---\nOptionally returns an specified element from the Json.\n### Parameters\n- `key` — `str` — The key of the element to return.\n\n### Returns\nThe element associated with the specified key, or undefined if the key can't be found" sortText: ff|tryGet insertText: tryGet($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): Json?" documentation: kind: markdown - value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" + value: "```wing\ntryGetAt: (index: num): Json?\n```\n---\nOptionally returns a specified element at a given index from Json Array.\n### Parameters\n- `index` — `num` — The index of the element in the Json Array to return.\n\n### Returns\nThe element at given index in Json Array, or undefined if index is not valid" sortText: ff|tryGetAt insertText: tryGetAt($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap b/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap index 5daa58435fd..8eae7f21956 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_reference_2.snap @@ -6,6 +6,6 @@ source: libs/wingc/src/lsp/completions.rs detail: Inner documentation: kind: markdown - value: "```wing\nbThing: Inner\nstruct Inner\n```\n---\n### Fields\n- `durationThing` — duration" + value: "```wing\nbThing: Inner\nstruct Inner\n```\n---\n### Fields\n- `durationThing` — `duration`" sortText: ab|bThing diff --git a/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap b/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap index 640dad3a7b1..2995a409c3e 100644 --- a/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap +++ b/libs/wingc/src/lsp/snapshots/completions/partial_reference_call.snap @@ -13,7 +13,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(index: num): str" documentation: kind: markdown - value: "```wing\nat: (index: num): str\n```\n---\nReturns the character at the specified index.\n\n\n### Returns\nstring at the specified index." + value: "```wing\nat: (index: num): str\n```\n---\nReturns the character at the specified index.\n### Parameters\n- `index` — `num` — position of the character.\n\n### Returns\nstring at the specified index." sortText: ff|at insertText: at($0) insertTextFormat: 2 @@ -25,7 +25,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(strN: str): str" documentation: kind: markdown - value: "```wing\nconcat: (strN: str): str\n```\n---\nCombines the text of two (or more) strings and returns a new string.\n\n\n### Returns\na new combined string." + value: "```wing\nconcat: (strN: str): str\n```\n---\nCombines the text of two (or more) strings and returns a new string.\n### Parameters\n- `strN` — `str` — one or more strings to concatenate to this string.\n\n### Returns\na new combined string." sortText: ff|concat insertText: concat($0) insertTextFormat: 2 @@ -37,7 +37,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\ncontains: (searchString: str): bool\n```\n---\nChecks if string includes substring.\n\n\n### Returns\ntrue if string includes substring." + value: "```wing\ncontains: (searchString: str): bool\n```\n---\nChecks if string includes substring.\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string includes substring." sortText: ff|contains insertText: contains($0) insertTextFormat: 2 @@ -49,7 +49,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\nendsWith: (searchString: str): bool\n```\n---\nDoes this string end with the given searchString?\n\n\n### Returns\ntrue if string ends with searchString." + value: "```wing\nendsWith: (searchString: str): bool\n```\n---\nDoes this string end with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string ends with searchString." sortText: ff|endsWith insertText: endsWith($0) insertTextFormat: 2 @@ -61,7 +61,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): num" documentation: kind: markdown - value: "```wing\nindexOf: (searchString: str): num\n```\n---\nReturns the index of the first occurrence of searchString found.\n\n\n### Returns\nthe index of the first occurrence of searchString found, or -1 if not found." + value: "```wing\nindexOf: (searchString: str): num\n```\n---\nReturns the index of the first occurrence of searchString found.\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\nthe index of the first occurrence of searchString found, or -1 if not found." sortText: ff|indexOf insertText: indexOf($0) insertTextFormat: 2 @@ -73,7 +73,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nlowercase: (): str\n```\n---\nReturns this string in lower case.\n\n\n### Returns\na new lower case string." + value: "```wing\nlowercase: (): str\n```\n---\nReturns this string in lower case.\n\n### Returns\na new lower case string." sortText: ff|lowercase insertText: lowercase() - label: replace @@ -81,7 +81,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str, replaceString: str): str" documentation: kind: markdown - value: "```wing\nreplace: (searchString: str, replaceString: str): str\n```\n---\nReplaces occurrences of a substring within a string.\n\n\n### Returns\nThe modified string after replacement." + value: "```wing\nreplace: (searchString: str, replaceString: str): str\n```\n---\nReplaces occurrences of a substring within a string.\n### Parameters\n- `searchString` — `str` — The substring to search for.\n- `replaceString` — `str` — The replacement substring.\n\n### Returns\nThe modified string after replacement." sortText: ff|replace insertText: replace($0) insertTextFormat: 2 @@ -93,7 +93,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(separator: str): Array" documentation: kind: markdown - value: "```wing\nsplit: (separator: str): Array\n```\n---\nSplits string by separator.\n\n\n### Returns\narray of strings." + value: "```wing\nsplit: (separator: str): Array\n```\n---\nSplits string by separator.\n### Parameters\n- `separator` — `str` — separator to split by.\n\n### Returns\narray of strings." sortText: ff|split insertText: split($0) insertTextFormat: 2 @@ -105,7 +105,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(searchString: str): bool" documentation: kind: markdown - value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n\n\n### Returns\ntrue if string starts with searchString." + value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string starts with searchString." sortText: ff|startsWith insertText: startsWith($0) insertTextFormat: 2 @@ -117,7 +117,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(indexStart: num, indexEnd: num?): str" documentation: kind: markdown - value: "```wing\nsubstring: (indexStart: num, indexEnd: num?): str\n```\n---\nReturns a string between indexStart, indexEnd.\n\n\n### Returns\nthe string contained from indexStart to indexEnd." + value: "```wing\nsubstring: (indexStart: num, indexEnd: num?): str\n```\n---\nReturns a string between indexStart, indexEnd.\n### Parameters\n- `indexStart` — `num` — index of the character we slice at.\n- `indexEnd` — `num?` — optional - index of the character we end slicing at.\n\n### Returns\nthe string contained from indexStart to indexEnd." sortText: ff|substring insertText: substring($0) insertTextFormat: 2 @@ -129,7 +129,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\ntrim: (): str\n```\n---\nRemoves white spaces from start and end of this string.\n\n\n### Returns\na new string with white spaces removed from start and end." + value: "```wing\ntrim: (): str\n```\n---\nRemoves white spaces from start and end of this string.\n\n### Returns\na new string with white spaces removed from start and end." sortText: ff|trim insertText: trim() - label: uppercase @@ -137,7 +137,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(): str" documentation: kind: markdown - value: "```wing\nuppercase: (): str\n```\n---\nReturns this string in upper case.\n\n\n### Returns\na new upper case string." + value: "```wing\nuppercase: (): str\n```\n---\nReturns this string in upper case.\n\n### Returns\na new upper case string." sortText: ff|uppercase insertText: uppercase() diff --git a/libs/wingc/src/lsp/snapshots/completions/show_private.snap b/libs/wingc/src/lsp/snapshots/completions/show_private.snap new file mode 100644 index 00000000000..4bc18d25e8e --- /dev/null +++ b/libs/wingc/src/lsp/snapshots/completions/show_private.snap @@ -0,0 +1,38 @@ +--- +source: libs/wingc/src/lsp/completions.rs +--- +- label: a + kind: 5 + detail: num + documentation: + kind: markdown + value: "```wing\npreflight a: num\n```" + sortText: ab|a +- label: node + kind: 5 + detail: Node + documentation: + kind: markdown + value: "```wing\npreflight node: Node\nclass Node\n```\n---\nRepresents the construct node in the scope tree.\n\n### Initializer\n- `host` — `Construct`\n- `scope` — `IConstruct`\n- `id` — `str`\n### Fields\n- `PATH_SEP` — `str` — Separator used to delimit construct path components.\n- `addr` — `str` — Returns an opaque tree-unique address for this construct.\n- `children` — `Array` — All direct children of this construct.\n- `dependencies` — `Array` — Return all dependencies registered on this node (non-recursive).\n- `id` — `str` — The id of this construct within the current scope.\n- `locked` — `bool` — Returns true if this construct or the scopes in which it is defined are locked.\n- `metadata` — `Array` — An immutable array of metadata objects associated with this construct.\n- `path` — `str` — The full, absolute path of this construct in the tree.\n- `root` — `IConstruct` — Returns the root of the construct tree.\n- `scopes` — `Array` — All parent scopes of this construct.\n- `defaultChild?` — `IConstruct?` — Returns the child construct that has the id `Default` or `Resource\"`.\n- `scope?` — `IConstruct?` — Returns the scope in which this construct is defined.\n### Methods\n- `addDependency` — `(deps: Array?): void` — Add an ordering dependency on another construct.\n- `addMetadata` — `(type: str, data: any, options: MetadataOptions?): void` — Adds a metadata entry to this construct.\n- `addValidation` — `(validation: IValidation): void` — Adds a validation to this construct.\n- `findAll` — `(order: ConstructOrder?): Array` — Return this construct and all of its children in the given order.\n- `findChild` — `(id: str): IConstruct` — Return a direct child by id.\n- `getContext` — `(key: str): any` — Retrieves a value from tree context if present. Otherwise, would throw an error.\n- `lock` — `(): void` — Locks this construct from allowing more children to be added.\n- `of` — `(construct: IConstruct): Node` — Returns the node associated with a construct.\n- `setContext` — `(key: str, value: any): void` — This can be used to set contextual values.\n- `tryFindChild` — `(id: str): IConstruct?` — Return a direct child by id, or undefined.\n- `tryGetContext` — `(key: str): any` — Retrieves a value from tree context.\n- `tryRemoveChild` — `(childName: str): bool` — Remove the child with the given name, if present.\n- `validate` — `(): Array` — Validates this construct." + sortText: ab|node +- label: bind + kind: 2 + detail: "preflight (host: IInflightHost, ops: Array): void" + documentation: + kind: markdown + value: "```wing\npreflight bind: preflight (host: IInflightHost, ops: Array): void\n```\n---\nBinds the resource to the host so that it can be used by inflight code.\n### Parameters\n- `host` — `IInflightHost`\n- `ops` — `Array`\n\n### Remarks\nYou can override this method to perform additional logic like granting\nIAM permissions to the host based on what methods are being called. But\nyou must call `super.bind(host, ops)` to ensure that the resource is\nactually bound." + sortText: ff|bind + insertText: bind($0) + insertTextFormat: 2 + command: + title: triggerParameterHints + command: editor.action.triggerParameterHints +- label: toString + kind: 2 + detail: "preflight (): str" + documentation: + kind: markdown + value: "```wing\npreflight toString: preflight (): str\n```\n---\nReturns a string representation of this construct." + sortText: ff|toString + insertText: toString() + diff --git a/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap b/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap index a1131411b5b..2387bf6b10d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_completions_after_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n\n\n### Returns\nthe immutable copy of the Json" + value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n\n\n### Returns\nthe mutable copy of the Json" + value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json." + value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n\n\n### Returns\nthe entries as Array" + value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, key: str): bool" documentation: kind: markdown - value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `json` — `Json` — The json object to inspect.\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n\n\n### Returns\nthe keys as Array" + value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n\n\n### Returns\nJson representation of the string" + value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($0) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($0) insertTextFormat: 2 @@ -114,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n\n\n### Returns\nthe values as Array" + value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" sortText: ff|values insertText: values($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap index a1131411b5b..2387bf6b10d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n\n\n### Returns\nthe immutable copy of the Json" + value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n\n\n### Returns\nthe mutable copy of the Json" + value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json." + value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n\n\n### Returns\nthe entries as Array" + value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, key: str): bool" documentation: kind: markdown - value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `json` — `Json` — The json object to inspect.\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n\n\n### Returns\nthe keys as Array" + value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n\n\n### Returns\nJson representation of the string" + value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($0) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($0) insertTextFormat: 2 @@ -114,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n\n\n### Returns\nthe values as Array" + value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" sortText: ff|values insertText: values($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap index a1131411b5b..2387bf6b10d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_json_after_expression_statement.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson): Json" documentation: kind: markdown - value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n\n\n### Returns\nthe immutable copy of the Json" + value: "```wing\nstatic deepCopy: (json: MutJson): Json\n```\n---\nCreates an immutable deep copy of the Json.\n### Parameters\n- `json` — `MutJson` — to copy.\n\n### Returns\nthe immutable copy of the Json" sortText: ff|deepCopy insertText: deepCopy($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): MutJson" documentation: kind: markdown - value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n\n\n### Returns\nthe mutable copy of the Json" + value: "```wing\nstatic deepCopyMut: (json: Json): MutJson\n```\n---\nCreates a mutable deep copy of the Json.\n### Parameters\n- `json` — `Json` — to copy.\n\n### Returns\nthe mutable copy of the Json" sortText: ff|deepCopyMut insertText: deepCopyMut($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: MutJson, key: str): void" documentation: kind: markdown - value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json." + value: "```wing\nstatic delete: (json: MutJson, key: str): void\n```\n---\nDeletes a key in a given Json.\n### Parameters\n- `json` — `MutJson` — to delete key from.\n- `key` — `str` — the key to delete." sortText: ff|delete insertText: delete($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n\n\n### Returns\nthe entries as Array" + value: "```wing\nstatic entries: (json: Json): Array\n```\n---\nReturns the entries from the Json.\n### Parameters\n- `json` — `Json` — map to get the entries from.\n\n### Returns\nthe entries as Array" sortText: ff|entries insertText: entries($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, key: str): bool" documentation: kind: markdown - value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n\n\n### Returns\nBoolean value corresponding to whether the key exists" + value: "```wing\nstatic has: (json: Json, key: str): bool\n```\n---\nChecks if a Json object has a given key.\n### Parameters\n- `json` — `Json` — The json object to inspect.\n- `key` — `str` — The key to check.\n\n### Returns\nBoolean value corresponding to whether the key exists" sortText: ff|has insertText: has($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any): Array" documentation: kind: markdown - value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n\n\n### Returns\nthe keys as Array" + value: "```wing\nstatic keys: (json: any): Array\n```\n---\nReturns the keys from the Json.\n### Parameters\n- `json` — `any` — map to get the keys from.\n\n### Returns\nthe keys as Array" sortText: ff|keys insertText: keys($0) insertTextFormat: 2 @@ -78,7 +78,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str): Json" documentation: kind: markdown - value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n\n\n### Returns\nJson representation of the string" + value: "```wing\nstatic parse: (str: str): Json\n```\n---\nParse a string into a Json.\n### Parameters\n- `str` — `str` — to parse as Json.\n\n### Returns\nJson representation of the string" sortText: ff|parse insertText: parse($0) insertTextFormat: 2 @@ -90,7 +90,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: any, options: JsonStringifyOptions?): str" documentation: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" sortText: ff|stringify insertText: stringify($0) insertTextFormat: 2 @@ -102,7 +102,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(str: str?): Json?" documentation: kind: markdown - value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n\n\n### Returns\nJson representation of the string or undefined if string is not parsable" + value: "```wing\nstatic tryParse: (str: str?): Json?\n```\n---\nTry to parse a string into a Json.\n### Parameters\n- `str` — `str?` — to parse as Json.\n\n### Returns\nJson representation of the string or undefined if string is not parsable" sortText: ff|tryParse insertText: tryParse($0) insertTextFormat: 2 @@ -114,7 +114,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): Array" documentation: kind: markdown - value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n\n\n### Returns\nthe values as Array" + value: "```wing\nstatic values: (json: Json): Array\n```\n---\nReturns the values from the Json.\n### Parameters\n- `json` — `Json` — map to get the values from.\n\n### Returns\nthe values as Array" sortText: ff|values insertText: values($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap b/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap index 1c1ff31940e..ed4e15bad70 100644 --- a/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap +++ b/libs/wingc/src/lsp/snapshots/completions/static_method_call.snap @@ -14,7 +14,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "preflight (x: any): bool" documentation: kind: markdown - value: "```wing\nstatic preflight isConstruct: preflight (x: any): bool\n```\n---\nChecks if `x` is a construct.\n\n\n### Returns\ntrue if `x` is an object created from a class which extends `Construct`.\n\n### Remarks\nUse this method instead of `instanceof` to properly detect `Construct`\ninstances, even when the construct library is symlinked.\n\nExplanation: in JavaScript, multiple copies of the `constructs` library on\ndisk are seen as independent, completely different libraries. As a\nconsequence, the class `Construct` in each copy of the `constructs` library\nis seen as a different class, and an instance of one class will not test as\n`instanceof` the other class. `npm install` will not create installations\nlike this, but users may manually symlink construct libraries together or\nuse a monorepo tool: in those cases, multiple copies of the `constructs`\nlibrary can be accidentally installed, and `instanceof` will behave\nunpredictably. It is safest to avoid using `instanceof`, and using\nthis type-testing method instead." + value: "```wing\nstatic preflight isConstruct: preflight (x: any): bool\n```\n---\nChecks if `x` is a construct.\n### Parameters\n- `x` — `any` — Any object.\n\n### Returns\ntrue if `x` is an object created from a class which extends `Construct`.\n\n### Remarks\nUse this method instead of `instanceof` to properly detect `Construct`\ninstances, even when the construct library is symlinked.\n\nExplanation: in JavaScript, multiple copies of the `constructs` library on\ndisk are seen as independent, completely different libraries. As a\nconsequence, the class `Construct` in each copy of the `constructs` library\nis seen as a different class, and an instance of one class will not test as\n`instanceof` the other class. `npm install` will not create installations\nlike this, but users may manually symlink construct libraries together or\nuse a monorepo tool: in those cases, multiple copies of the `constructs`\nlibrary can be accidentally installed, and `instanceof` will behave\nunpredictably. It is safest to avoid using `instanceof`, and using\nthis type-testing method instead." sortText: ff|isConstruct insertText: isConstruct($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap index 07df0cdb796..6982f19bd47 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_all.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\nx: str\n```" - sortText: "ab|x:" + sortText: "ab|a|x:" insertText: "x: $1" insertTextFormat: 2 command: @@ -19,7 +19,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ny: num\n```" - sortText: "ab|y:" + sortText: "ab|a|y:" insertText: "y: $1" insertTextFormat: 2 command: diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap index e9ea4bc42b9..97885fb9f1d 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_unused.snap @@ -7,7 +7,7 @@ source: libs/wingc/src/lsp/completions.rs documentation: kind: markdown value: "```wing\ny: num\n```" - sortText: "ab|y:" + sortText: "ab|a|y:" insertText: "y: $1" insertTextFormat: 2 command: diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap index 1a7ad9bbe8e..1b70d600640 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_literal_value.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(condition: bool): void" documentation: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" sortText: cc|assert insertText: assert($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(message: str): void" documentation: kind: markdown - value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n\n### Parameters\n- `message` — The message to log" + value: "```wing\nlog: (message: str): void\n```\n---\nLogs a message\n### Parameters\n- `message` — `str` — The message to log" sortText: cc|log insertText: log($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(value: any): any" documentation: kind: markdown - value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n\n### Parameters\n- `value` — The value to cast into a different type" + value: "```wing\nunsafeCast: (value: any): any\n```\n---\nCasts a value into a different type. This is unsafe and can cause runtime errors\n### Parameters\n- `value` — `any` — The value to cast into a different type" sortText: cc|unsafeCast insertText: unsafeCast($0) insertTextFormat: 2 @@ -41,7 +41,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct Foo\n```\n---\n### Fields\n- `x` — str\n- `y` — num" + value: "```wing\nstruct Foo\n```\n---\n### Fields\n- `x` — `str`\n- `y` — `num`" sortText: hh|Foo - label: "inflight () => {}" kind: 15 diff --git a/libs/wingc/src/lsp/snapshots/completions/struct_static.snap b/libs/wingc/src/lsp/snapshots/completions/struct_static.snap index 133b441359d..0e1a67c58f0 100644 --- a/libs/wingc/src/lsp/snapshots/completions/struct_static.snap +++ b/libs/wingc/src/lsp/snapshots/completions/struct_static.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json, options: JsonValidationOptions?): T1" documentation: kind: markdown - value: "```wing\nstatic fromJson: (json: Json, options: JsonValidationOptions?): T1\n```\n---\nConverts a Json to a Struct." + value: "```wing\nstatic fromJson: (json: Json, options: JsonValidationOptions?): T1\n```\n---\nConverts a Json to a Struct.\n### Parameters\n- `json` — `Json`\n- `...options` — `JsonValidationOptions?`\n \n - `unsafe?` — `bool?` — Unsafe mode to skip validation (may lead to runtime errors)." sortText: ff|fromJson insertText: fromJson($0) insertTextFormat: 2 @@ -26,7 +26,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(json: Json): T1?" documentation: kind: markdown - value: "```wing\nstatic tryFromJson: (json: Json): T1?\n```\n---\nConverts a Json to a Struct, returning nil if the Json is not valid." + value: "```wing\nstatic tryFromJson: (json: Json): T1?\n```\n---\nConverts a Json to a Struct, returning nil if the Json is not valid.\n### Parameters\n- `json` — `Json`" sortText: ff|tryFromJson insertText: tryFromJson($0) insertTextFormat: 2 diff --git a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap index 5c5698467b4..159d8931508 100644 --- a/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap +++ b/libs/wingc/src/lsp/snapshots/completions/util_static_methods.snap @@ -6,7 +6,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(stringToDecode: str, url: bool?): str" documentation: kind: markdown - value: "```wing\nstatic base64Decode: (stringToDecode: str, url: bool?): str\n```\n---\nConverts a string from base64 to UTF-8.\n\n\n### Returns\nThe UTF-8 string." + value: "```wing\nstatic base64Decode: (stringToDecode: str, url: bool?): str\n```\n---\nConverts a string from base64 to UTF-8.\n### Parameters\n- `stringToDecode` — `str` — base64 string to decode.\n- `url` — `bool?` — If `true`, the source is expected to be a URL-safe base64 string.\n\n### Returns\nThe UTF-8 string." sortText: ff|base64Decode insertText: base64Decode($0) insertTextFormat: 2 @@ -18,7 +18,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(stringToEncode: str, url: bool?): str" documentation: kind: markdown - value: "```wing\nstatic base64Encode: (stringToEncode: str, url: bool?): str\n```\n---\nConverts a string from UTF-8 to base64.\n\n\n### Returns\nThe base64 string." + value: "```wing\nstatic base64Encode: (stringToEncode: str, url: bool?): str\n```\n---\nConverts a string from UTF-8 to base64.\n### Parameters\n- `stringToEncode` — `str` — The name of the UTF-8 string to encode.\n- `url` — `bool?` — If `true`, a URL-safe base64 string is returned.\n\n### Returns\nThe base64 string." sortText: ff|base64Encode insertText: base64Encode($0) insertTextFormat: 2 @@ -30,7 +30,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(name: str): str" documentation: kind: markdown - value: "```wing\nstatic env: (name: str): str\n```\n---\nReturns the value of an environment variable.\n\n\n### Remarks\nThrows if not found or empty." + value: "```wing\nstatic env: (name: str): str\n```\n---\nReturns the value of an environment variable.\n### Parameters\n- `name` — `str` — The name of the environment variable.\n\n### Remarks\nThrows if not found or empty." sortText: ff|env insertText: env($0) insertTextFormat: 2 @@ -42,7 +42,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(options: NanoidOptions?): str" documentation: kind: markdown - value: "```wing\nstatic nanoid: (options: NanoidOptions?): str\n```\n---\nGenerates a unique ID using the nanoid library.\n\n\n### Remarks\n# @link https://github.com/ai/nanoid" + value: "```wing\nstatic nanoid: (options: NanoidOptions?): str\n```\n---\nGenerates a unique ID using the nanoid library.\n### Parameters\n- `...options` — `NanoidOptions?` — - Optional options object for generating the ID.\n \n - `alphabet?` — `str?` — Characters that make up the alphabet to generate the ID, limited to 256 characters or fewer.\n - `size?` — `num?` — Size of ID.\n\n### Remarks\n# @link https://github.com/ai/nanoid" sortText: ff|nanoid insertText: nanoid($0) insertTextFormat: 2 @@ -54,7 +54,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(data: str): str" documentation: kind: markdown - value: "```wing\nstatic sha256: (data: str): str\n```\n---\nComputes the SHA256 hash of the given data." + value: "```wing\nstatic sha256: (data: str): str\n```\n---\nComputes the SHA256 hash of the given data.\n### Parameters\n- `data` — `str` — - The string to be hashed." sortText: ff|sha256 insertText: sha256($0) insertTextFormat: 2 @@ -66,7 +66,7 @@ source: libs/wingc/src/lsp/completions.rs detail: "(name: str): str?" documentation: kind: markdown - value: "```wing\nstatic tryEnv: (name: str): str?\n```\n---\nReturns the value of an environment variable.\n\n\n### Returns\nThe value of the environment variable or `nil`.\n\n### Remarks\nReturns `nil` if not found or empty." + value: "```wing\nstatic tryEnv: (name: str): str?\n```\n---\nReturns the value of an environment variable.\n### Parameters\n- `name` — `str` — The name of the environment variable.\n\n### Returns\nThe value of the environment variable or `nil`.\n\n### Remarks\nReturns `nil` if not found or empty." sortText: ff|tryEnv insertText: tryEnv($0) insertTextFormat: 2 @@ -85,30 +85,30 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Util\n```\n---\nUtility functions." + value: "```wing\nclass Util\n```\n---\nUtility functions.\n\n### Methods\n- `base64Decode` — `(stringToDecode: str, url: bool?): str` — Converts a string from base64 to UTF-8.\n- `base64Encode` — `(stringToEncode: str, url: bool?): str` — Converts a string from UTF-8 to base64.\n- `env` — `(name: str): str` — Returns the value of an environment variable.\n- `nanoid` — `(options: NanoidOptions?): str` — Generates a unique ID using the nanoid library.\n- `sha256` — `(data: str): str` — Computes the SHA256 hash of the given data.\n- `sleep` — `inflight (delay: duration): void` — Suspends execution for a given duration.\n- `tryEnv` — `(name: str): str?` — Returns the value of an environment variable.\n- `uuidv4` — `(): str` — Generates a version 4 UUID.\n- `waitUntil` — `inflight (predicate: inflight (): bool, props: WaitUntilProps?): bool` — Run a predicate repeatedly, waiting until it returns true or until the timeout elapses." sortText: gg|Util - label: NanoidOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct NanoidOptions\n```\n---\nOptions to generating a unique ID.\n### Fields\n- `alphabet?` — Characters that make up the alphabet to generate the ID, limited to 256 characters or fewer.\n- `size?` — Size of ID." + value: "```wing\nstruct NanoidOptions\n```\n---\nOptions to generating a unique ID.\n### Fields\n- `alphabet?` — `str?` — Characters that make up the alphabet to generate the ID, limited to 256 characters or fewer.\n- `size?` — `num?` — Size of ID." sortText: hh|NanoidOptions - label: WaitUntilProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WaitUntilProps\n```\n---\nProperties for `util.waitUntil`.\n### Fields\n- `interval?` — Interval between predicate retries.\n- `timeout?` — The timeout for keep trying predicate." + value: "```wing\nstruct WaitUntilProps\n```\n---\nProperties for `util.waitUntil`.\n### Fields\n- `interval?` — `duration?` — Interval between predicate retries.\n- `timeout?` — `duration?` — The timeout for keep trying predicate." sortText: hh|WaitUntilProps - label: IPredicateHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IPredicateHandler extends IResource\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — The Predicate function that is called.\n- `node` — `Node`" + value: "```wing\ninterface IPredicateHandler extends IResource\n```\n---\nA predicate with an inflight \"handle\" method that can be passed to `util.busyWait`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): bool` — The Predicate function that is called." sortText: ii|IPredicateHandler - label: IPredicateHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IPredicateHandlerClient\n```\n---\nInflight client for `IPredicateHandler`.\n### Methods\n- `handle` — The Predicate function that is called." + value: "```wing\ninterface IPredicateHandlerClient\n```\n---\nInflight client for `IPredicateHandler`.\n### Methods\n- `handle` — `inflight (): bool` — The Predicate function that is called." sortText: ii|IPredicateHandlerClient diff --git a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap index 1e7bfa13719..898440d17d3 100644 --- a/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap +++ b/libs/wingc/src/lsp/snapshots/completions/variable_type_annotation_namespace.snap @@ -5,79 +5,79 @@ source: libs/wingc/src/lsp/completions.rs kind: 7 documentation: kind: markdown - value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations." + value: "```wing\nclass Api\n```\n---\nFunctionality shared between all `Api` implementations.\n\n### Initializer\n- `...props` — `ApiProps?`\n \n - `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n - `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes.\n### Fields\n- `node` — `Node` — The tree node.\n- `url` — `str` — The base URL of the API endpoint.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `connect` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiConnectProps?): void` — Add a inflight handler to the api for CONNECT requests on the given path.\n- `delete` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiDeleteProps?): void` — Add a inflight handler to the api for DELETE requests on the given path.\n- `get` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiGetProps?): void` — Add a inflight handler to the api for GET requests on the given path.\n- `head` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiHeadProps?): void` — Add a inflight handler to the api for HEAD requests on the given path.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `options` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiOptionsProps?): void` — Add a inflight handler to the api for OPTIONS requests on the given path.\n- `patch` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPatchProps?): void` — Add a inflight handler to the api for PATCH requests on the given path.\n- `post` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPostProps?): void` — Add a inflight handler to the api for POST requests on the given path.\n- `put` — `preflight (path: str, inflight: inflight (request: ApiRequest): ApiResponse, props: ApiPutProps?): void` — Add a inflight handler to the api for PUT requests on the given path.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Api - label: Bucket kind: 7 documentation: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: gg|Bucket - label: Counter kind: 7 documentation: kind: markdown - value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter." + value: "```wing\nclass Counter\n```\n---\nA distributed atomic counter.\n\n### Initializer\n- `...props` — `CounterProps?`\n \n - `initial?` — `num?` — The initial value of the counter.\n### Fields\n- `initial` — `num` — The initial value of the counter.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Counter - label: Domain kind: 7 documentation: kind: markdown - value: "```wing\nclass Domain\n```\n---\nA cloud Domain." + value: "```wing\nclass Domain\n```\n---\nA cloud Domain.\n\n### Initializer\n- `...props` — `DomainProps`\n \n - `domainName` — `str` — The website's custom domain name.\n### Fields\n- `domainName` — `str` — The domain name.\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Domain - label: Function kind: 7 documentation: kind: markdown - value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function." + value: "```wing\nclass Function impl IInflightHost\n```\n---\nA function.\n\n### Initializer\n- `handler` — `inflight (event: str): void`\n- `...props` — `FunctionProps?`\n \n - `env?` — `Map?` — Environment variables to pass to the function.\n - `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n - `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n - `timeout?` — `duration?` — The maximum amount of time the function can run.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Function - label: OnDeploy kind: 7 documentation: kind: markdown - value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed." + value: "```wing\nclass OnDeploy\n```\n---\nRun code every time the app is deployed.\n\n### Initializer\n- `handler` — `inflight (): void`\n- `...props` — `OnDeployProps?`\n \n - `env?` — `Map?`\n - `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n - `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n - `logRetentionDays?` — `num?`\n - `memory?` — `num?`\n - `timeout?` — `duration?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|OnDeploy - label: Queue kind: 7 documentation: kind: markdown - value: "```wing\nclass Queue\n```\n---\nA queue." + value: "```wing\nclass Queue\n```\n---\nA queue.\n\n### Initializer\n- `...props` — `QueueProps?`\n \n - `retentionPeriod?` — `duration?` — How long a queue retains a message.\n - `timeout?` — `duration?` — How long a queue's consumers have to process a message.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue.\n- `setConsumer` — `preflight (handler: inflight (message: str): void, props: QueueSetConsumerProps?): Function` — Create a function to consume messages from this queue.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Queue - label: Schedule kind: 7 documentation: kind: markdown - value: "```wing\nclass Schedule\n```\n---\nA schedule." + value: "```wing\nclass Schedule\n```\n---\nA schedule.\n\n### Initializer\n- `...props` — `ScheduleProps?`\n \n - `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n - `rate?` — `duration?` — Trigger events at a periodic rate.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onTick` — `preflight (inflight: inflight (): void, props: ScheduleOnTickProps?): Function` — Create a function that runs when receiving the scheduled event.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Schedule - label: Secret kind: 7 documentation: kind: markdown - value: "```wing\nclass Secret\n```\n---\nA cloud secret." + value: "```wing\nclass Secret\n```\n---\nA cloud secret.\n\n### Initializer\n- `...props` — `SecretProps?`\n \n - `name?` — `str?` — The secret's name.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: gg|Secret - label: Service kind: 7 documentation: kind: markdown - value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service." + value: "```wing\nclass Service impl IInflightHost\n```\n---\nA long-running service.\n\n### Initializer\n- `handler` — `inflight (): inflight (): void?`\n- `...props` — `ServiceProps?`\n \n - `autoStart?` — `bool?` — Whether the service should start automatically.\n - `env?` — `Map?` — Environment variables to pass to the function.\n### Fields\n- `env` — `Map` — Returns the set of environment variables for this function.\n- `node` — `Node` — The tree node.\n### Methods\n- `addEnvironment` — `preflight (name: str, value: str): void` — Add an environment variable to the function.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Service - label: Topic kind: 7 documentation: kind: markdown - value: "```wing\nclass Topic\n```\n---\nA topic." + value: "```wing\nclass Topic\n```\n---\nA topic.\n\n### Initializer\n- `...props` — `TopicProps?`\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `onMessage` — `preflight (inflight: inflight (event: str): void, props: TopicOnMessageProps?): Function` — Run an inflight whenever an message is published to the topic.\n- `publish` — `inflight (message: str): void` — Publish message to topic.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Topic - label: Website kind: 7 documentation: kind: markdown - value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website." + value: "```wing\nclass Website impl IWebsite\n```\n---\nA cloud static website.\n\n### Initializer\n- `...props` — `WebsiteProps`\n \n - `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n - `domain?` — `Domain?`\n### Fields\n- `node` — `Node` — The tree node.\n- `path` — `str` — Absolute local path to the website's static files.\n- `url` — `str` — The website's url.\n### Methods\n- `addFile` — `preflight (path: str, data: str, options: AddFileOptions): str` — Add a file to the website during deployment.\n- `addJson` — `preflight (path: str, data: Json): str` — Add a JSON file with custom values during the website's deployment.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." sortText: gg|Website - label: AddFileOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — File's content type." + value: "```wing\nstruct AddFileOptions\n```\n---\nOptions for adding a file with custom value during the website's deployment.\n### Fields\n- `contentType?` — `str?` — File's content type." sortText: hh|AddFileOptions - label: ApiConnectProps kind: 22 @@ -89,7 +89,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — Whether to allow credentials.\n- `allowHeaders?` — The list of allowed headers.\n- `allowMethods?` — The list of allowed methods.\n- `allowOrigin?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — The list of exposed headers.\n- `maxAge?` — How long the browser should cache preflight request results." + value: "```wing\nstruct ApiCorsOptions\n```\n---\nCors Options for `Api`.\n### Fields\n- `allowCredentials?` — `bool?` — Whether to allow credentials.\n- `allowHeaders?` — `Array?` — The list of allowed headers.\n- `allowMethods?` — `Array?` — The list of allowed methods.\n- `allowOrigin?` — `Array?` — The list of allowed allowOrigin.\n- `exposeHeaders?` — `Array?` — The list of exposed headers.\n- `maxAge?` — `duration?` — How long the browser should cache preflight request results." sortText: hh|ApiCorsOptions - label: ApiDeleteProps kind: 22 @@ -131,7 +131,7 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — Options for configuring the API's CORS behavior across all routes." + value: "```wing\nstruct ApiProps\n```\n---\nOptions for `Api`.\n### Fields\n- `cors?` — `bool?` — Options for configuring the API's CORS behavior across all routes.\n- `corsOptions?` — `ApiCorsOptions?` — Options for configuring the API's CORS behavior across all routes." sortText: hh|ApiProps - label: ApiPutProps kind: 22 @@ -143,25 +143,25 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `body?` — The request's body.\n- `headers?` — The request's headers.\n- `method` — The request's HTTP method.\n- `path` — The request's path.\n- `query` — The request's query string values.\n- `vars` — The path variables." + value: "```wing\nstruct ApiRequest\n```\n---\nShape of a request to an inflight handler.\n### Fields\n- `method` — `HttpMethod` — The request's HTTP method.\n- `path` — `str` — The request's path.\n- `query` — `Map` — The request's query string values.\n- `vars` — `Map` — The path variables.\n- `body?` — `str?` — The request's body.\n- `headers?` — `Map?` — The request's headers." sortText: hh|ApiRequest - label: ApiResponse kind: 22 documentation: kind: markdown - value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `body?` — The response's body.\n- `headers?` — The response's headers.\n- `status` — The response's status code." + value: "```wing\nstruct ApiResponse\n```\n---\nShape of a response from a inflight handler.\n### Fields\n- `status` — `num` — The response's status code.\n- `body?` — `str?` — The response's body.\n- `headers?` — `Map?` — The response's headers." sortText: hh|ApiResponse - label: BucketDeleteOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." sortText: hh|BucketDeleteOptions - label: BucketEvent kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — The bucket key that triggered the event.\n- `type` — Type of event." + value: "```wing\nstruct BucketEvent\n```\n---\nOn_event notification payload- will be in use after solving issue: https://github.com/winglang/wing/issues/1927.\n### Fields\n- `key` — `str` — The bucket key that triggered the event.\n- `type` — `BucketEventType` — Type of event." sortText: hh|BucketEvent - label: BucketOnCreateProps kind: 22 @@ -191,97 +191,97 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." sortText: hh|BucketProps - label: CounterProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — The initial value of the counter." + value: "```wing\nstruct CounterProps\n```\n---\nOptions for `Counter`.\n### Fields\n- `initial?` — `num?` — The initial value of the counter." sortText: hh|CounterProps - label: DomainProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — The website's custom domain name." + value: "```wing\nstruct DomainProps\n```\n---\nOptions for `Domain`.\n### Fields\n- `domainName` — `str` — The website's custom domain name." sortText: hh|DomainProps - label: FunctionProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — Environment variables to pass to the function.\n- `logRetentionDays?` — Specifies the number of days that function logs will be kept.\n- `memory?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — The maximum amount of time the function can run." + value: "```wing\nstruct FunctionProps\n```\n---\nOptions for `Function`.\n### Fields\n- `env?` — `Map?` — Environment variables to pass to the function.\n- `logRetentionDays?` — `num?` — Specifies the number of days that function logs will be kept.\n- `memory?` — `num?` — The amount of memory to allocate to the function, in MB.\n- `timeout?` — `duration?` — The maximum amount of time the function can run." sortText: hh|FunctionProps - label: GetSecretValueOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — Whether to cache the value." + value: "```wing\nstruct GetSecretValueOptions\n```\n---\nOptions when getting a secret value.\n### Fields\n- `cache?` — `bool?` — Whether to cache the value." sortText: hh|GetSecretValueOptions - label: ObjectMetadata kind: 22 documentation: kind: markdown - value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `contentType?` — The content type of the object, if it is known.\n- `lastModified` — The time the object was last modified.\n- `size` — The size of the object in bytes." + value: "```wing\nstruct ObjectMetadata\n```\n---\nMetadata of a bucket object.\n### Fields\n- `lastModified` — `Datetime` — The time the object was last modified.\n- `size` — `num` — The size of the object in bytes.\n- `contentType?` — `str?` — The content type of the object, if it is known." sortText: hh|ObjectMetadata - label: OnDeployProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — Map?\n- `executeAfter?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct OnDeployProps extends FunctionProps\n```\n---\nOptions for `OnDeploy`.\n### Fields\n- `env?` — `Map?`\n- `executeAfter?` — `Array?` — Execute this trigger only after these resources have been provisioned.\n- `executeBefore?` — `Array?` — Adds this trigger as a dependency on other constructs.\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|OnDeployProps - label: QueueProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — How long a queue retains a message.\n- `timeout?` — How long a queue's consumers have to process a message." + value: "```wing\nstruct QueueProps\n```\n---\nOptions for `Queue`.\n### Fields\n- `retentionPeriod?` — `duration?` — How long a queue retains a message.\n- `timeout?` — `duration?` — How long a queue's consumers have to process a message." sortText: hh|QueueProps - label: QueueSetConsumerProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — The maximum number of messages to send to subscribers at once.\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct QueueSetConsumerProps extends FunctionProps\n```\n---\nOptions for Queue.setConsumer.\n### Fields\n- `batchSize?` — `num?` — The maximum number of messages to send to subscribers at once.\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|QueueSetConsumerProps - label: ScheduleOnTickProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ScheduleOnTickProps extends FunctionProps\n```\n---\nOptions for Schedule.onTick.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ScheduleOnTickProps - label: ScheduleProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — Trigger events at a periodic rate." + value: "```wing\nstruct ScheduleProps\n```\n---\nOptions for `Schedule`.\n### Fields\n- `cron?` — `str?` — Trigger events according to a cron schedule using the UNIX cron format.\n- `rate?` — `duration?` — Trigger events at a periodic rate." sortText: hh|ScheduleProps - label: SecretProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — The secret's name." + value: "```wing\nstruct SecretProps\n```\n---\nOptions for `Secret`.\n### Fields\n- `name?` — `str?` — The secret's name." sortText: hh|SecretProps - label: ServiceOnStartProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct ServiceOnStartProps extends FunctionProps\n```\n---\nOptions for Service.onStart.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|ServiceOnStartProps - label: ServiceProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — Whether the service should start automatically.\n- `env?` — Environment variables to pass to the function." + value: "```wing\nstruct ServiceProps\n```\n---\nOptions for `Service`.\n### Fields\n- `autoStart?` — `bool?` — Whether the service should start automatically.\n- `env?` — `Map?` — Environment variables to pass to the function." sortText: hh|ServiceProps - label: SignedUrlOptions kind: 22 documentation: kind: markdown - value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — The duration for the signed url to expire." + value: "```wing\nstruct SignedUrlOptions\n```\n---\nInterface for signed url options.\n### Fields\n- `duration?` — `duration?` — The duration for the signed url to expire." sortText: hh|SignedUrlOptions - label: TopicOnMessageProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — Map?\n- `logRetentionDays?` — num?\n- `memory?` — num?\n- `timeout?` — duration?" + value: "```wing\nstruct TopicOnMessageProps extends FunctionProps\n```\n---\nOptions for `Topic.onMessage`.\n### Fields\n- `env?` — `Map?`\n- `logRetentionDays?` — `num?`\n- `memory?` — `num?`\n- `timeout?` — `duration?`" sortText: hh|TopicOnMessageProps - label: TopicProps kind: 22 @@ -293,13 +293,13 @@ source: libs/wingc/src/lsp/completions.rs kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — The website's custom domain object." + value: "```wing\nstruct WebsiteOptions\n```\n---\nOptions for `Website`, and `ReactApp`.\n### Fields\n- `domain?` — `Domain?` — The website's custom domain object." sortText: hh|WebsiteOptions - label: WebsiteProps kind: 22 documentation: kind: markdown - value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `domain?` — Domain?\n- `path` — Local path to the website's static files, relative to the Wing source file or absolute." + value: "```wing\nstruct WebsiteProps extends WebsiteOptions\n```\n---\nOptions for `Website`.\n### Fields\n- `path` — `str` — Local path to the website's static files, relative to the Wing source file or absolute.\n- `domain?` — `Domain?`" sortText: hh|WebsiteProps - label: IApiClient kind: 8 @@ -311,55 +311,55 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Inflight that will be called when a request is made to the endpoint.\n- `node` — `Node`" + value: "```wing\ninterface IApiEndpointHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to one of the `Api` request preflight methods.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandler - label: IApiEndpointHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — Inflight that will be called when a request is made to the endpoint." + value: "```wing\ninterface IApiEndpointHandlerClient\n```\n---\nInflight client for `IApiEndpointHandler`.\n### Methods\n- `handle` — `inflight (request: ApiRequest): ApiResponse` — Inflight that will be called when a request is made to the endpoint." sortText: ii|IApiEndpointHandlerClient - label: IBucketClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — Delete an existing object using a key from the bucket.\n- `exists` — Check if an object exists in the bucket.\n- `get` — Retrieve an object from the bucket.\n- `getJson` — Retrieve a Json object from the bucket.\n- `list` — Retrieve existing objects keys from the bucket.\n- `metadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — Returns a url to the given file.\n- `put` — Put an object in the bucket.\n- `putJson` — Put a Json object in the bucket.\n- `signedUrl` — Returns a signed url to the given file.\n- `tryDelete` — Delete an object from the bucket if it exists.\n- `tryGet` — Get an object from the bucket if it exists.\n- `tryGetJson` — Gets an object from the bucket if it exists, parsing it as Json." + value: "```wing\ninterface IBucketClient\n```\n---\nInflight interface for `Bucket`.\n### Methods\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." sortText: ii|IBucketClient - label: IBucketEventHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when an event notification is fired.\n- `node` — `Node`" + value: "```wing\ninterface IBucketEventHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandler - label: IBucketEventHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — Function that will be called when an event notification is fired." + value: "```wing\ninterface IBucketEventHandlerClient\n```\n---\nA resource with an inflight \"handle\" method that can be passed to the bucket events.\n### Methods\n- `handle` — `inflight (key: str, type: BucketEventType): void` — Function that will be called when an event notification is fired." sortText: ii|IBucketEventHandlerClient - label: ICounterClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — Decrement the counter, returning the previous value.\n- `inc` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — Get the current value of the counter.\n- `set` — Set a counter to a given value." + value: "```wing\ninterface ICounterClient\n```\n---\nInflight interface for `Counter`.\n### Methods\n- `dec` — `inflight (amount: num?, key: str?): num` — Decrement the counter, returning the previous value.\n- `inc` — `inflight (amount: num?, key: str?): num` — Increments the counter atomically by a certain amount and returns the previous value.\n- `peek` — `inflight (key: str?): num` — Get the current value of the counter.\n- `set` — `inflight (value: num, key: str?): void` — Set a counter to a given value." sortText: ii|ICounterClient - label: IFunctionClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — Invokes the function with a payload and waits for the result." + value: "```wing\ninterface IFunctionClient\n```\n---\nInflight interface for `Function`.\n### Methods\n- `invoke` — `inflight (payload: str): str` — Invokes the function with a payload and waits for the result." sortText: ii|IFunctionClient - label: IFunctionHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the cloud function is invoked.\n- `node` — `Node`" + value: "```wing\ninterface IFunctionHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used to create a `cloud.Function`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandler - label: IFunctionHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the cloud function is invoked." + value: "```wing\ninterface IFunctionHandlerClient\n```\n---\nInflight client for `IFunctionHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Entrypoint function that will be called when the cloud function is invoked." sortText: ii|IFunctionHandlerClient - label: IOnDeployClient kind: 8 @@ -371,31 +371,31 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Entrypoint function that will be called when the app is deployed.\n- `node` — `Node`" + value: "```wing\ninterface IOnDeployHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be used by `cloud.OnDeploy`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandler - label: IOnDeployHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — Entrypoint function that will be called when the app is deployed." + value: "```wing\ninterface IOnDeployHandlerClient\n```\n---\nInflight client for `IOnDeployHandler`.\n### Methods\n- `handle` — `inflight (): void` — Entrypoint function that will be called when the app is deployed." sortText: ii|IOnDeployHandlerClient - label: IQueueClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — Retrieve the approximate number of messages in the queue.\n- `pop` — Pop a message from the queue.\n- `purge` — Purge all of the messages in the queue.\n- `push` — Push one or more messages to the queue." + value: "```wing\ninterface IQueueClient\n```\n---\nInflight interface for `Queue`.\n### Methods\n- `approxSize` — `inflight (): num` — Retrieve the approximate number of messages in the queue.\n- `pop` — `inflight (): str?` — Pop a message from the queue.\n- `purge` — `inflight (): void` — Purge all of the messages in the queue.\n- `push` — `inflight (messages: Array?): void` — Push one or more messages to the queue." sortText: ii|IQueueClient - label: IQueueSetConsumerHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the queue.\n- `node` — `Node`" + value: "```wing\ninterface IQueueSetConsumerHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Queue.setConsumer`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandler - label: IQueueSetConsumerHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the queue." + value: "```wing\ninterface IQueueSetConsumerHandlerClient\n```\n---\nInflight client for `IQueueSetConsumerHandler`.\n### Methods\n- `handle` — `inflight (message: str): void` — Function that will be called when a message is received from the queue." sortText: ii|IQueueSetConsumerHandlerClient - label: IScheduleClient kind: 8 @@ -407,73 +407,73 @@ source: libs/wingc/src/lsp/completions.rs kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the schedule.\n- `node` — `Node`" + value: "```wing\ninterface IScheduleOnTickHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Schedule.on_tick`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandler - label: IScheduleOnTickHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the schedule." + value: "```wing\ninterface IScheduleOnTickHandlerClient\n```\n---\nInflight client for `IScheduleOnTickHandler`.\n### Methods\n- `handle` — `inflight (): void` — Function that will be called when a message is received from the schedule." sortText: ii|IScheduleOnTickHandlerClient - label: ISecretClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — Retrieve the value of the secret.\n- `valueJson` — Retrieve the Json value of the secret." + value: "```wing\ninterface ISecretClient\n```\n---\nInflight interface for `Secret`.\n### Methods\n- `value` — `inflight (options: GetSecretValueOptions?): str` — Retrieve the value of the secret.\n- `valueJson` — `inflight (options: GetSecretValueOptions?): Json` — Retrieve the Json value of the secret." sortText: ii|ISecretClient - label: IServiceClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — Start the service.\n- `started` — Indicates whether the service is started.\n- `stop` — Stop the service." + value: "```wing\ninterface IServiceClient\n```\n---\nInflight interface for `Service`.\n### Methods\n- `start` — `inflight (): void` — Start the service.\n- `started` — `inflight (): bool` — Indicates whether the service is started.\n- `stop` — `inflight (): void` — Stop the service." sortText: ii|IServiceClient - label: IServiceHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service starts.\n- `node` — `Node`" + value: "```wing\ninterface IServiceHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is started.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandler - label: IServiceHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — Handler to run when the service starts." + value: "```wing\ninterface IServiceHandlerClient\n```\n---\nInflight client for `IServiceHandler`.\n### Methods\n- `handle` — `preflight (): inflight (): void?` — Handler to run when the service starts." sortText: ii|IServiceHandlerClient - label: IServiceStopHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Handler to run when the service stops.\n- `node` — `Node`" + value: "```wing\ninterface IServiceStopHandler extends IResource\n```\n---\nExecuted when a `cloud.Service` is stopped.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandler - label: IServiceStopHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — Handler to run when the service stops." + value: "```wing\ninterface IServiceStopHandlerClient\n```\n---\nInflight client for `IServiceStopHandler`.\n### Methods\n- `handle` — `inflight (): void` — Handler to run when the service stops." sortText: ii|IServiceStopHandlerClient - label: ITopicClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — Publish message to topic." + value: "```wing\ninterface ITopicClient\n```\n---\nInflight interface for `Topic`.\n### Methods\n- `publish` — `inflight (message: str): void` — Publish message to topic." sortText: ii|ITopicClient - label: ITopicOnMessageHandler kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — Function that will be called when a message is received from the topic.\n- `node` — `Node`" + value: "```wing\ninterface ITopicOnMessageHandler extends IResource\n```\n---\nA resource with an inflight \"handle\" method that can be passed to `Topic.on_message`.\n### Fields\n- `node` — `Node`\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void`\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandler - label: ITopicOnMessageHandlerClient kind: 8 documentation: kind: markdown - value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — Function that will be called when a message is received from the topic." + value: "```wing\ninterface ITopicOnMessageHandlerClient\n```\n---\nInflight client for `ITopicOnMessageHandler`.\n### Methods\n- `handle` — `inflight (event: str): void` — Function that will be called when a message is received from the topic." sortText: ii|ITopicOnMessageHandlerClient - label: IWebsite kind: 8 documentation: kind: markdown - value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Methods\n- `url` — The website URL." + value: "```wing\ninterface IWebsite\n```\n---\nBase interface for a website.\n### Fields\n- `url` — `str` — The website URL." sortText: ii|IWebsite - label: IWebsiteClient kind: 8 diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap index 081f59044d1..f6163bbacb2 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_inflight.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap index 91ae7957a8e..cb544f537f1 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_in_preflight.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n\n### Parameters\n- `condition` — The condition to assert" + value: "```wing\nassert: (condition: bool): void\n```\n---\nAsserts that a condition is true\n### Parameters\n- `condition` — `bool` — The condition to assert" range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap b/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap index dc95a6471c7..3a83f716ba7 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/builtin_instance_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n\n\n### Returns\ntrue if string starts with searchString." + value: "```wing\nstartsWith: (searchString: str): bool\n```\n---\nDoes this string start with the given searchString?\n### Parameters\n- `searchString` — `str` — substring to search for.\n\n### Returns\ntrue if string starts with searchString." range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_property.snap b/libs/wingc/src/lsp/snapshots/hovers/class_property.snap index 6a94898f437..0eed3f7910b 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_property.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_property.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight addObject: preflight (key: str, body: str): void\n```\n---\nAdd a file to the bucket that is uploaded when the app is deployed.\n\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." + value: "```wing\npreflight addObject: preflight (key: str, body: str): void\n```\n---\nAdd a file to the bucket that is uploaded when the app is deployed.\n### Parameters\n- `key` — `str`\n- `body` — `str`\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap b/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap index df58b34e8fa..68bd38ce1e2 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/class_symbol.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\npreflight bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap b/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap index 2b3fcd0683a..123fa21d988 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inflight_init.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstruct Data\n```\n---\n### Fields\n- `field` — str" + value: "```wing\nstruct Data\n```\n---\n### Fields\n- `field` — `str`" range: start: line: 11 diff --git a/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap b/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap index 358fb2892d7..9ac840a86d5 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/inside_class_field.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\npreflight my_bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\npreflight my_bucket: Bucket\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." range: start: line: 3 diff --git a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap index 3514adc9ac5..bb721f7d085 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/multipart_reference_hover_middle.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" + value: "```wing\nget: (key: str): Json\n```\n---\nReturns the value associated with the specified Json key.\n### Parameters\n- `key` — `str` — The key of the Json property.\n\n### Returns\nThe value associated with the specified Json key\n\n*@throws* *Json property does not exist if the given key is not part of an existing property*" range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap b/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap index 907b0a79a69..ee1755f0cba 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/new_statement.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Bucket\n```\n---\nA cloud object store." + value: "```wing\nclass Bucket\n```\n---\nA cloud object store.\n\n### Initializer\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible.\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `addFile` — `preflight (key: str, path: str, encoding: str?): void` — Add a file to the bucket from system folder.\n- `addObject` — `preflight (key: str, body: str): void` — Add a file to the bucket that is uploaded when the app is deployed.\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `delete` — `inflight (key: str, opts: BucketDeleteOptions?): void` — Delete an existing object using a key from the bucket.\n- `exists` — `inflight (key: str): bool` — Check if an object exists in the bucket.\n- `get` — `inflight (key: str): str` — Retrieve an object from the bucket.\n- `getJson` — `inflight (key: str): Json` — Retrieve a Json object from the bucket.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `list` — `inflight (prefix: str?): Array` — Retrieve existing objects keys from the bucket.\n- `metadata` — `inflight (key: str): ObjectMetadata` — Get the metadata of an object in the bucket.\n- `onCreate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnCreateProps?): void` — Run an inflight whenever a file is uploaded to the bucket.\n- `onDelete` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnDeleteProps?): void` — Run an inflight whenever a file is deleted from the bucket.\n- `onEvent` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnEventProps?): void` — Run an inflight whenever a file is uploaded, modified, or deleted from the bucket.\n- `onUpdate` — `preflight (fn: inflight (key: str, type: BucketEventType): void, opts: BucketOnUpdateProps?): void` — Run an inflight whenever a file is updated in the bucket.\n- `publicUrl` — `inflight (key: str): str` — Returns a url to the given file.\n- `put` — `inflight (key: str, body: str): void` — Put an object in the bucket.\n- `putJson` — `inflight (key: str, body: Json): void` — Put a Json object in the bucket.\n- `signedUrl` — `inflight (key: str, options: SignedUrlOptions?): str` — Returns a signed url to the given file.\n- `toString` — `preflight (): str` — Returns a string representation of this construct.\n- `tryDelete` — `inflight (key: str): bool` — Delete an object from the bucket if it exists.\n- `tryGet` — `inflight (key: str): str?` — Get an object from the bucket if it exists.\n- `tryGetJson` — `inflight (key: str): Json?` — Gets an object from the bucket if it exists, parsing it as Json." range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_method.snap b/libs/wingc/src/lsp/snapshots/hovers/static_method.snap index 2e0f12de56e..a2dc4d76f32 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic preflight my: preflight (a: str, b: bool): str\n```" + value: "```wing\nstatic preflight my: preflight (a: str, b: bool): str\n```\n---\n### Parameters\n- `a` — `str`\n- `b` — `bool`" range: start: line: 5 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap b/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap index c4399c5b015..04e5543ad8d 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_method_root.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Json\n```\n---\nImmutable Json." + value: "```wing\nclass Json\n```\n---\nImmutable Json.\n\n### Methods\n- `asBool` — `(): bool` — Convert Json element to boolean if possible.\n- `asNum` — `(): num` — Convert Json element to number if possible.\n- `asStr` — `(): str` — Convert Json element to string if possible.\n- `deepCopy` — `(json: MutJson): Json` — Creates an immutable deep copy of the Json.\n- `deepCopyMut` — `(json: Json): MutJson` — Creates a mutable deep copy of the Json.\n- `delete` — `(json: MutJson, key: str): void` — Deletes a key in a given Json.\n- `entries` — `(json: Json): Array` — Returns the entries from the Json.\n- `get` — `(key: str): Json` — Returns the value associated with the specified Json key.\n- `getAt` — `(index: num): Json` — Returns a specified element at a given index from Json Array.\n- `has` — `(json: Json, key: str): bool` — Checks if a Json object has a given key.\n- `keys` — `(json: any): Array` — Returns the keys from the Json.\n- `parse` — `(str: str): Json` — Parse a string into a Json.\n- `stringify` — `(json: any, options: JsonStringifyOptions?): str` — Formats Json as string.\n- `tryAsBool` — `(): bool?` — Convert Json element to boolean if possible.\n- `tryAsNum` — `(): num?` — Convert Json element to number if possible.\n- `tryAsStr` — `(): str?` — Convert Json element to string if possible.\n- `tryGet` — `(key: str): Json?` — Optionally returns an specified element from the Json.\n- `tryGetAt` — `(index: num): Json?` — Optionally returns a specified element at a given index from Json Array.\n- `tryParse` — `(str: str?): Json?` — Try to parse a string into a Json.\n- `values` — `(json: Json): Array` — Returns the values from the Json." range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap index d457f74d5ed..b5b0bed7a2a 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/static_stdtype_method.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n\n\n### Returns\nstring representation of the Json" + value: "```wing\nstatic stringify: (json: any, options: JsonStringifyOptions?): str\n```\n---\nFormats Json as string.\n### Parameters\n- `json` — `any` — to format as string.\n- `...options` — `JsonStringifyOptions?`\n \n - `indent` — `num` — Indentation spaces number.\n\n### Returns\nstring representation of the Json" range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap index 07461b084da..d3fc15ea345 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_annotation.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---" + value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." range: start: line: 2 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap index c081d40d46b..4b5dd1e53ca 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_type_reference_type.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---" + value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." range: start: line: 4 diff --git a/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap b/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap index f4c6d1ccf64..6e631189471 100644 --- a/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap +++ b/libs/wingc/src/lsp/snapshots/hovers/user_defined_types.snap @@ -3,7 +3,7 @@ source: libs/wingc/src/lsp/hover.rs --- contents: kind: markdown - value: "```wing\nclass Foo\n```\n---" + value: "```wing\nclass Foo\n```\n---\n\n### Fields\n- `node` — `Node` — The tree node.\n### Methods\n- `bind` — `preflight (host: IInflightHost, ops: Array): void` — Binds the resource to the host so that it can be used by inflight code.\n- `isConstruct` — `preflight (x: any): bool` — Checks if `x` is a construct.\n- `toString` — `preflight (): str` — Returns a string representation of this construct." range: start: line: 1 diff --git a/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap b/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap index cd60dfc142f..f1a79843375 100644 --- a/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap +++ b/libs/wingc/src/lsp/snapshots/signature/constructor_arg.snap @@ -5,11 +5,11 @@ signatures: - label: "(...props): Bucket" documentation: kind: markdown - value: "" + value: "### Parameters\n- `...props` — `BucketProps?`\n \n - `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." parameters: - label: "...props" documentation: kind: markdown - value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — Whether the bucket's objects should be publicly accessible." + value: "```wing\nstruct BucketProps\n```\n---\nOptions for `Bucket`.\n### Fields\n- `public?` — `bool?` — Whether the bucket's objects should be publicly accessible." activeParameter: 0 diff --git a/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap b/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap index a841d19897c..51111711cfb 100644 --- a/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap +++ b/libs/wingc/src/lsp/snapshots/signature/named_arg_active.snap @@ -5,12 +5,12 @@ signatures: - label: "(key: str, ...opts): void" documentation: kind: markdown - value: "Delete an existing object using a key from the bucket.\n\n### Parameters\n- `key` — Key of the object.\n- `opts` — Options available for delete an item from a bucket." + value: "Delete an existing object using a key from the bucket.\n### Parameters\n- `key` — `str` — Key of the object.\n- `...opts` — `BucketDeleteOptions?` — Options available for delete an item from a bucket.\n \n - `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." parameters: - label: "key: str" - label: "...opts" documentation: kind: markdown - value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — Check failures on the method and retrieve errors if any." + value: "```wing\nstruct BucketDeleteOptions\n```\n---\nInterface for delete method inside `Bucket`.\n### Fields\n- `mustExist?` — `bool?` — Check failures on the method and retrieve errors if any." activeParameter: 1 diff --git a/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap b/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap index c933d096312..f0bc836a384 100644 --- a/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap +++ b/libs/wingc/src/lsp/snapshots/signature/second_arg_active.snap @@ -5,7 +5,7 @@ signatures: - label: "(key: str, body: str): void" documentation: kind: markdown - value: "Add a file to the bucket that is uploaded when the app is deployed.\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." + value: "Add a file to the bucket that is uploaded when the app is deployed.\n### Parameters\n- `key` — `str`\n- `body` — `str`\n\n### Remarks\nTODO: In the future this will support uploading any `Blob` type or\nreferencing a file from the local filesystem." parameters: - label: "key: str" - label: "body: str" diff --git a/libs/wingc/src/type_check.rs b/libs/wingc/src/type_check.rs index de54cf30268..c18a21b7cf4 100644 --- a/libs/wingc/src/type_check.rs +++ b/libs/wingc/src/type_check.rs @@ -1096,6 +1096,10 @@ impl TypeRef { } } + pub fn is_function_sig(&self) -> bool { + matches!(**self, Type::Function(_)) + } + /// If this is a function and its last argument is a struct, return that struct. pub fn get_function_struct_arg(&self) -> Option<&Struct> { if let Some(func) = self.maybe_unwrap_option().as_function_sig() { @@ -3274,8 +3278,8 @@ impl<'a> TypeChecker<'a> { tc.type_check_try_catch(env, try_statements, catch_block, finally_statements); } StmtKind::CompilerDebugEnv => { - println!("[symbol environment at {}]", stmt.span); - println!("{}", env); + eprintln!("[symbol environment at {}]", stmt.span); + eprintln!("{}", env); } StmtKind::SuperConstructor { arg_list } => { tc.type_check_super_constructor_against_parent_initializer(stmt, arg_list, env); diff --git a/tools/hangar/__snapshots__/test_corpus/sdk_tests/fs/yaml.main.w_compile_tf-aws.md b/tools/hangar/__snapshots__/test_corpus/sdk_tests/fs/yaml.main.w_compile_tf-aws.md index 319e54cf564..f37d019c1a4 100644 --- a/tools/hangar/__snapshots__/test_corpus/sdk_tests/fs/yaml.main.w_compile_tf-aws.md +++ b/tools/hangar/__snapshots__/test_corpus/sdk_tests/fs/yaml.main.w_compile_tf-aws.md @@ -113,14 +113,6 @@ class $Root extends $stdlib.std.Resource { const tmpdir = (fs.Util.mkdtemp()); const filepath = String.raw({ raw: ["", "/test-preflight.yaml"] }, tmpdir); const data = ({"foo": "bar","arr": [1, 2, 3, "test", ({"foo": "bar"})]}); - try { - (fs.Util.writeFile(filepath,"invalid: {{ content }}, invalid")); - (fs.Util.readYaml(filepath)); - } - catch ($error_e) { - const e = $error_e.message; - {((cond) => {if (!cond) throw new Error("assertion failed: regex.match(\"^bad indentation\", e) == true")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((regex.Util.match("^bad indentation",e)),true)))}; - } (fs.Util.writeYaml(filepath,data,data)); {((cond) => {if (!cond) throw new Error("assertion failed: fs.exists(filepath) == true")})((((a,b) => { try { return require('assert').deepStrictEqual(a,b) === undefined; } catch { return false; } })((fs.Util.exists(filepath)),true)))}; const objs = (fs.Util.readYaml(filepath)); diff --git a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.test.w_test_sim.md b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.test.w_test_sim.md index 831a57bc07d..dfc5e12e7bf 100644 --- a/tools/hangar/__snapshots__/test_corpus/valid/debug_env.test.w_test_sim.md +++ b/tools/hangar/__snapshots__/test_corpus/valid/debug_env.test.w_test_sim.md @@ -1,10 +1,14 @@ # [debug_env.test.w](../../../../../examples/tests/valid/debug_env.test.w) | test | sim -## stdout.log +## stderr.log ```log [symbol environment at debug_env.test.w:7:5] level 0: { this => A } level 1: { A => A [type], assert => (condition: bool): void, cloud => cloud [namespace], log => (message: str): void, std => std [namespace], unsafeCast => (value: any): any } +``` + +## stdout.log +```log pass ─ debug_env.test.wsim (no tests) diff --git a/tools/hangar/src/generated_test_targets.ts b/tools/hangar/src/generated_test_targets.ts index be4292571e0..9e80295cc93 100644 --- a/tools/hangar/src/generated_test_targets.ts +++ b/tools/hangar/src/generated_test_targets.ts @@ -89,7 +89,8 @@ export async function testTest( env, }); - fileMap["stdout.log"] = out.stdout; + if (out.stderr) fileMap["stderr.log"] = out.stderr; + if (out.stdout) fileMap["stdout.log"] = out.stdout; await createMarkdownSnapshot(fileMap, filePath, "test", "sim"); }