Skip to content

Instantly share code, notes, and snippets.

@skflowne
Last active August 4, 2020 20:13
Show Gist options
  • Save skflowne/3bd847f3bc29aba2952090b0e5f361a6 to your computer and use it in GitHub Desktop.
Save skflowne/3bd847f3bc29aba2952090b0e5f361a6 to your computer and use it in GitHub Desktop.
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