11import x = require( 'xastscript' )
22
3+ const xmlns = 'http://www.sitemaps.org/schemas/sitemap/0.9'
4+ const xmlNumberAttribute = 100
5+
36x ( 'urlset' ) // $ExpectType Element
47x ( 'urlset' , 'string' ) // $ExpectType Element
58x ( 'urlset' , 1 ) // $ExpectType Element
@@ -14,8 +17,6 @@ x(null, 'string') // $ExpectType Root
1417x ( null , 1 ) // $ExpectType Root
1518x ( null , [ ] ) // $ExpectType Root
1619
17- const xmlns = 'http://www.sitemaps.org/schemas/sitemap/0.9'
18-
1920x ( 'urlset' , { xmlns} ) // $ExpectType Element
2021x ( 'urlset' , { xmlns} , 'string' ) // $ExpectType Element
2122x ( 'urlset' , { xmlns} , [ 'string' , 'string' ] ) // $ExpectType Element
@@ -26,7 +27,6 @@ x('urlset', {xmlns}, x('loc'), x('loc')) // $ExpectType Element
2627x ( 'urlset' , { xmlns} , [ x ( 'loc' ) , x ( 'loc' ) ] ) // $ExpectType Element
2728x ( 'urlset' , { xmlns} , [ ] ) // $ExpectType Element
2829
29- const xmlNumberAttribute = 100
3030x ( 'urlset' , { xmlNumberAttribute} , 'string' ) // $ExpectType Element
3131x ( 'urlset' , { xmlNumberAttribute} , 100 ) // $ExpectType Element
3232x ( 'urlset' , { xmlNumberAttribute} , x ( 'loc' ) , 100 ) // $ExpectType Element
0 commit comments