Skip to content

Commit

Permalink
Merge branch 'master' into doc-restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Jun 16, 2019
2 parents d270542 + 71c0955 commit de7b883
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/compiler/compile/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import render_ssr from './render-ssr/index';
import { CompileOptions, Warning } from '../interfaces';
import Component from './Component';
import fuzzymatch from '../utils/fuzzymatch';
import { get_name_from_filename } from './utils/get_name_from_filename';
import get_name_from_filename from './utils/get_name_from_filename';

const valid_options = [
'format',
Expand Down
19 changes: 19 additions & 0 deletions src/runtime/ambient.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
declare module '*.svelte' {
type Props = Record<string, any>;

export default class {
constructor(options: {
target: Element;
anchor?: Element;
props?: Props;
hydrate?: boolean;
intro?: boolean;
});

$set(props: Props): void;
$on<T = any>(event: string, callback: (event: CustomEvent<T>) => void): () => void;
$destroy(): void;

[accessor: string]: any;
}
}
2 changes: 2 additions & 0 deletions src/runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import './ambient';

export {
onMount,
onDestroy,
Expand Down

0 comments on commit de7b883

Please sign in to comment.