18 Matching Annotations
  1. May 2021
  2. Apr 2021
  3. Mar 2021
  4. Feb 2021
  5. Jan 2021
    1. Maybe $$slots like $$props? My use case is that I'd like to wrap a slot's content in an element that applies styling that I'd like absent without the slotted content. Something like this: {#if $$slots.description} <div class="description"> <slot name="description"></slot> </div> {/if}
  6. Aug 2020
  7. Jul 2020
  8. Nov 2019
    1. // require('hammerjs') when in a browser. This is safe because Hammer is only // invoked in componentDidMount, which is not executed on the server. var Hammer = (typeof window !== 'undefined') ? require('hammerjs') : undefined
  9. Oct 2019
    1. type FindByTag<Union, Tag> = Union extends { tag: Tag } ? Union : never; function cast<A extends Foo["tag"]>(foo: Foo, expectedTag: A): FindByTag<Foo, A> { if (foo.tag !== expectedTag) throw Error(`expected tag ${expectedTag} but was ${foo.tag}`) return foo as FindByTag<Foo, A>; }
  10. Sep 2019
  11. Oct 2015
  12. Sep 2013
    1. it is plain that the more we are under these conditions the more easily we are stirred.

      It's conditional, emotions must be gauged by the speaker and they must understand the context