anonymous No title
No License TypeScript
2019年07月17日
Copy Clone
type NodeType = VNode | string | number
type Attributes = {[key: string]: string | Function }

export interface View<State, Actions> {
  (state: State, actions: Actions): VNode;
}

/**
 * 仮想DOM
 */
export interface VNode {
  nodeName: keyof ElementTagNameMap
  attributes: Attributes
  children: NodeType[]
}

/**
 * 仮想DOMを生成
 */
export function h(
  nodeName: keyof ElementTagNameMap,
  attributes: Attributes,
  ...children: NodeType[]
): VNode {
  return { nodeName, attributes, children };
}

/**
 * リアルDOMを生成
 */
export function createElement(node: NodeType): HTMLElement | Text {
  if (!isVNode(node)) {
    return document.createTextNode(node.toString());
  }

  const el = document.createElement(node.nodeName)
}
type NodeType = VNode | string | number
type Attributes = {[key: string]: string | Function }

export interface View<State, Actions> {
  (state: State, actions: Actions): VNode;
}

/**
 * 仮想DOM
 */
export interface VNode {
  nodeName: keyof ElementTagNameMap
  attributes: Attributes
  children: NodeType[]
}

/**
 * 仮想DOMを生成
 */
export function h(
  nodeName: keyof ElementTagNameMap,
  attributes: Attributes,
  ...children: NodeType[]
): VNode {
  return { nodeName, attributes, children };
}

/**
 * リアルDOMを生成
 */
export function createElement(node: NodeType): HTMLElement | Text {
  if (!isVNode(node)) {
    return document.createTextNode(node.toString());
  }

  const el = document.createElement(node.nodeName)
}
anonymous
Anonymous
2021年04月20日
Drugs information for patients. Brand names. <a href="https://pregabalininfo.top">buy cheap pregabalin without prescription</a> in USA Some information about medicament. Get here.
anonymous
Anonymous
2021年04月29日
Drugs information sheet. Short-Term Effects. <a href="https://topregabalin.top">can i buy cheap pregabalin without dr prescription</a> in Canada Best what you want to know about medication. Read information now.
anonymous
Anonymous
2021年04月30日
cialis ad <a href="https://mycialistabs.com/">tadalafil 5mg</a> cialis viagra
anonymous
Anonymous
2021年04月30日
cheap generic cialis <a href="https://mycialistabs.com/">cialis from canada</a> when will cialis become generic
anonymous
Anonymous
2021年05月03日
cialis patent expiration date <a href="https://toptadalafiltabs.com/">cialis com</a> how to get cialis prescription online
anonymous
Anonymous
2021年05月03日
cialis professional <a href="https://toptadalafiltabs.com/">cialis generic</a> viagra vs. cialis
anonymous
Anonymous
2021年05月05日
how long does it take to write 1000 word essay <a href="https://topessaywriterfas.com/">essay writing companies</a> how to write an essay for scholarship applications
anonymous
Anonymous
2021年05月05日
how to write a perfect essay example <a href="https://topessaywriterfas.com/">buy essays cheap</a> how to write a scientific review essay
anonymous
Anonymous
2021年05月07日
descriptive essay writing <a href="http://writemyessayslfd.com/">write opinion essay</a> writing essay conclusion
anonymous
Anonymous
2021年05月07日
upsc civil service essay <a href="http://writemyessayslfd.com/">writing an analytical essay</a> research paper essay service
anonymous
Anonymous
2021年05月07日
viagra cost <a href="https://mrviagrashop.com">best generic viagra</a> viagra for men
anonymous
Anonymous
2021年05月07日
sildenafil viagra <a href="https://mrviagrashop.com">will 10 year old viagra work</a> lovely lilith viagra falls
anonymous
Anonymous
2021年05月08日
100 mg viagra <a href="https://mysildenafilkr.com/">sildenafil 20mg tablets</a> viagra savings card
anonymous
Anonymous
2021年05月08日
generic viagra online <a href="https://mysildenafilkr.com/">https://mysildenafilkr.com/</a> sildenafil citrate
anonymous
Anonymous
2021年05月12日
front desk resume <a href="http://coverletterforresumetop.com/">best resume review services</a> hair stylist resume
anonymous
Anonymous
2021年05月12日
finance resume <a href="http://coverletterforresumetop.com/">cover letter for job</a> high school resume for college
anonymous
Anonymous
2021年05月12日
is cialis better than viagra <a href="http://tadalafilled.com/">tadalafil vs viagra</a> prescription free cialis
anonymous
Anonymous
2021年05月12日
when to take cialis <a href="http://tadalafilled.com/">tadalafil 5 mg</a> does medicare cover cialis
anonymous
Anonymous
2021年05月13日
mechanical engineering resume <a href="https://writingacoverletteronline.com/">write my resume</a> resume professional writers
anonymous
Anonymous
2021年05月13日
photography resume <a href="https://writingacoverletteronline.com/">it resume writer</a> help desk resume
anonymous
Anonymous
2021年05月14日
generic viagra walmart <a href="https://edviagramaster.net/">www.edviagramaster.net</a> sildenafil online
anonymous
Anonymous
2021年05月14日
viagra walgreens <a href="https://edviagramaster.net/">walgreens viagra</a> sildenafil 100 mg
anonymous
Anonymous
2022年03月26日
essay editing service asia <a href="https://englishessayblog.com/">buy custom essay online</a> good summary for community service essay
anonymous
Anonymous
2021年05月16日
sildenafil 20 mg prices <a href="https://sildenafilviagratop.com">viagra online usa</a> sildenafil prescription online
anonymous
Anonymous
2021年05月16日
sildenafil citrate for sale <a href="https://sildenafilviagratop.com">sildenafil 20 mg walmart</a> substitute for viagra
anonymous
Anonymous
2021年05月16日
prescription free cialis <a href="https://cialisortadalafil.com/">viagra vs cialis forum</a> how long does cialis last in your system
anonymous
Anonymous
2021年05月16日
cialis drug <a href="https://cialisortadalafil.com/">cialis generic timeline</a> cialis and bph
anonymous
Anonymous
2022年03月28日
free essay writing service cheapest 4 hours <a href="https://englishessayblog.com/">do my essay for me fast</a> essay on how i have reflected and will reflect the ideals of the rotary motto “service above self”
anonymous
Anonymous
2021年05月17日
does cialis lose effectiveness over time <a href="https://topcialistabs.com/">tadalafil vs sildenafil</a> cialis 20 mg price walgreens
anonymous
Anonymous
2021年05月17日
cialis amazon <a href="https://topcialistabs.com/">cialis directions</a> cialis generics
anonymous
Anonymous
2021年06月01日
Drug information for patients. Short-Term Effects. <a href="https://prednisolone4u.top">how to get prednisolone</a> in USA Some about medicines. Read information now.
anonymous
Anonymous
2021年07月19日
<a href="https://krasota4u.ru">where can i buy cheap trazodone</a>
anonymous
Anonymous
2021年07月25日
Medication prescribing information. What side effects? <a href="https://plaquenil4people.top">generic plaquenil price</a> in USA Everything information about drugs. Get here.