Skip to content

Commit

Permalink
LV: Update build
Browse files Browse the repository at this point in the history
  • Loading branch information
loganvolkers committed Dec 1, 2020
1 parent ab28bb3 commit 22f4a53
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
build/
dist/
www/
loader/
Expand Down
6 changes: 3 additions & 3 deletions src/stencil-context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { getElement, getRenderingRef } from '@stencil/core';
import { HTMLStencilElement } from '@stencil/core/internal';
import { createContext as rawCreate, ContextProvider, ContextListener, ListenerOptions } from 'dom-context';
import { useCallback, useEffect, useMemo, useRef, useState } from 'haunted';
import { Context } from 'haunted/lib/create-context';


const LISTENER = Symbol('listener');

export interface Constructor<T> {
interface Constructor<T> {
new (...args: any[]): T;
}

export type ContextHandler<T, C> = (component: C, context: T) => unknown;
type ContextHandler<T, C> = (component: C, context: T) => unknown;

export function createContext<T>(name: string, initial?: T) {
const raw = rawCreate(name, initial);
Expand Down
4 changes: 3 additions & 1 deletion src/stencil-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { State } from 'haunted';
import { getElement, forceUpdate } from '@stencil/core';
import debugFactory from 'debug';

const debug = debugFactory('stencil-context');
const debug = debugFactory('stencil-hook');

export * from "./stencil-context"

/**
* Set up a Stencil component's internal state so that it can use hooks.
Expand Down
4 changes: 2 additions & 2 deletions src/tests/components.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, Prop, h, Host } from '@stencil/core';
import { ContextProvider, ListenerConnectionStatus, OnChange } from 'dom-context';
import { useEffect, useState } from 'haunted';
import { ContextProvider } from 'dom-context';
import { useEffect } from 'haunted';
import { useDomContext, useDomContextState } from '../stencil-context';
import { withHooks } from '../stencil-hooks';

Expand Down

0 comments on commit 22f4a53

Please sign in to comment.