Add some extra definitions to monaco typescript
This commit is contained in:
@@ -7,6 +7,7 @@ import { useRouter } from 'next/router'
|
||||
|
||||
import Box from './Box'
|
||||
import Container from './Container'
|
||||
import asc from 'assemblyscript/dist/asc'
|
||||
import { createNewFile, saveFile } from '../state/actions'
|
||||
import { apiHeaderFiles } from '../state/constants'
|
||||
import state from '../state'
|
||||
@@ -210,6 +211,11 @@ const HooksEditor = () => {
|
||||
)
|
||||
}
|
||||
|
||||
monaco.languages.typescript.typescriptDefaults.addExtraLib(
|
||||
asc.definitionFiles.assembly,
|
||||
'assemblyscript/std/assembly/index.d.ts'
|
||||
)
|
||||
|
||||
// create the web socket
|
||||
if (!subscriptionRef.current) {
|
||||
monaco.languages.register({
|
||||
|
||||
Reference in New Issue
Block a user