Last active
August 4, 2020 20:13
-
-
Save skflowne/3bd847f3bc29aba2952090b0e5f361a6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import { readable } from "svelte/store" | |
import apiFiles from "../api" | |
// import our custom File interface | |
import type { File } from "../interfaces/file.interface" | |
// create a readonly store which is going to contain an array of File | |
const files = readable<File[]>([], (set) => { | |
set(apiFiles) | |
}) | |
export default files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment