This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#![feature(generators, generator_trait, never_type, type_alias_impl_trait)] | |
use yew::html::AnyScope; | |
use pin_cell::PinMut; | |
use pin_cell::PinCell; | |
use std::rc::Rc; | |
use std::pin::Pin; | |
use yew::Html; | |
use yew::Component; | |
use yew::ComponentLink; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use gloo_console as console; | |
use js_sys::Date; | |
use std::rc::Rc; | |
use yew::{function_component, html, use_reducer, Callback, Html, Reducible}; | |
// Define the possible actions which can be sent to the counter | |
pub enum Action { | |
Increment, | |
Decrement, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use gloo_events::EventListener; | |
use wasm_bindgen::{JsCast, UnwrapThrowExt}; | |
use yew::events::{Event, KeyboardEvent}; | |
use yew::html::IntoPropValue; | |
use yew::prelude::*; | |
use yew::virtual_dom::VNode; | |
#[derive(Copy, Clone, Debug, PartialEq)] | |
pub enum TooltipPosition { | |
Top, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The two main components are the interfaces | |
// Generic<T, Context> and GenericArg<"identifier"> | |
// Generic basically structurally replaces types in T that are GenericArg<S> | |
// for some `S extends keyof Context` with `Context[S]` | |
// See the test cases for specific uses. | |
// ====== TESTING | |
// Pass through for trivial types | |
type Test00 = Generic<number>; |
OlderNewer