Skip to content

v0.16.1 - less is more

Choose a tag to compare

@trusktr trusktr released this 03 Aug 06:05
· 10 commits to main since this release
  • Make the property list to ElementInternals optional for type definitions. 7c276d6

    Before:

    @element
    class JuicyElement extends Element {
      static elementName = 'juicy-el'
    
      // ...This class does not define new attributes....
    }
    
    declare module 'solid-js' {
    	namespace JSX {
    		interface IntrinsicElements {
    			[JuicyElement.elementName]: ElementAttributes<JuicyElement, keyof {}>
    		}
    	}
    }

    After:

    // ...same class...
    
    declare module 'solid-js' {
    	namespace JSX {
    		interface IntrinsicElements {
    			[JuicyElement.elementName]: ElementAttributes<JuicyElement> // <--- no second arg
    		}
    	}
    }