File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,6 +49,17 @@ public macro uncheckedHTML<T>(
4949 _ innerHTML: Sendable ...
5050) -> T = #externalMacro( module: " HTMLKitMacros " , type: " HTMLElementMacro " )
5151
52+ /// Same as `#html` but ignoring compiler warnings.
53+ ///
54+ /// - Returns: The inferred concrete type.
55+ @freestanding ( expression)
56+ public macro uncheckedHTML< T> (
57+ encoding: HTMLEncoding = . string,
58+ resultType: HTMLExpansionResultType = . literal,
59+ lookupFiles: [ StaticString ] = [ ] ,
60+ _ innerHTML: ( ) -> Sendable ...
61+ ) -> T = #externalMacro( module: " HTMLKitMacros " , type: " HTMLElementMacro " )
62+
5263// MARK: Raw
5364/// Does not escape the `innerHTML`.
5465///
Original file line number Diff line number Diff line change @@ -335,6 +335,9 @@ extension InterpolationTests {
335335
336336 @Test func uncheckedInterpolation( ) {
337337 let _: String = #uncheckedHTML( encoding: . string, div ( InterpolationTests . patrick) )
338+ let _: String = #uncheckedHTML( encoding: . string) {
339+ div ( InterpolationTests . patrick)
340+ }
338341 }
339342
340343 @Test func closureInterpolation( ) {
You can’t perform that action at this time.
0 commit comments