import { EXTENSION_ACTION_TYPES } from '../../constants';
import { TextDocumentPositionParams } from 'vscode-languageserver-protocol';


export type OPEN_DOCUMENT_PAYLOAD  = {
    document: {
        textDocument: {
            uri: string;
            languageId: string;
            version: number;
            text: string;
        },
    },
    language: string;
};

export const setOpenDocument = (payload: OPEN_DOCUMENT_PAYLOAD) => (dispatch) => {
    dispatch({
        type: EXTENSION_ACTION_TYPES.OPEN_DOCUMENT,
        payload,
    });
};

