Add Active Storage types

This commit is contained in:
Eric 2020-05-19 14:16:53 -05:00
parent 34882dc099
commit 54c4b76693
4 changed files with 10 additions and 1 deletions

View file

@ -13,6 +13,7 @@
},
"devDependencies": {
"@babel/preset-env": "^7.7.1",
"@types/activestorage": "^5.2.2",
"@types/color": "^3.0.0",
"@types/enzyme": "^3.1.9",
"@types/enzyme-to-json": "^1.5.1",

View file

@ -10,7 +10,7 @@
"experimentalDecorators": true,
"baseUrl": "./",
"lib": ["dom","es5", "scripthost", "es2015.promise"],
"paths": { "*": [ "./types/*"] },
"paths": { "*": [ "./types/*"], "@rails/activestorage": ["./types/rails__activestorage"] },
"typeRoots" : [
"node_modules/@types",
"./types"]

3
types/rails__activestorage/index.d.ts vendored Normal file
View file

@ -0,0 +1,3 @@
import {start, DirectUpload, DirectUploadDelegate, Blob} from 'activestorage';
export {start, DirectUpload, DirectUploadDelegate, Blob};

View file

@ -1021,6 +1021,11 @@
resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5"
integrity sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==
"@types/activestorage@^5.2.2":
version "5.2.2"
resolved "https://registry.yarnpkg.com/@types/activestorage/-/activestorage-5.2.2.tgz#82473e47c25f3e1488400dca69b982a1591dbac0"
integrity sha512-qsyspA6wVRz8tAN4lYaPXrlcZ1AcqbQyBfNNg/zEmQbMu5/ch8f2rspGLK+A4ZhgoRXG0/ivSPeZ/a+1g10U4w==
"@types/babel__core@^7.1.0":
version "7.1.7"
resolved "https://registry.yarnpkg.com/@types/babel__core/-/babel__core-7.1.7.tgz#1dacad8840364a57c98d0dd4855c6dd3752c6b89"