Skip to content

Commit

Permalink
ts conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthv96 committed Sep 23, 2022
1 parent f40f2a0 commit 8a48917
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .vite/jisonPlugin.js → .vite/jisonPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function jison() {
return {
name: 'jison',

transform(src, id) {
transform(src: string, id: string) {
if (fileRegex.test(id)) {
return {
code: transformJison(src),
Expand Down
4 changes: 3 additions & 1 deletion .vite/jisonTransformer.js → .vite/jisonTransformer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// @ts-ignore No typings for jison
import jison from 'jison';

export const transformJison = (src) => {
export const transformJison = (src: string): string => {
// @ts-ignore No typings for jison
const parser = new jison.Generator(src, {
moduleType: 'js',
'token-stack': true,
Expand Down
2 changes: 1 addition & 1 deletion .vite/server.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import express from 'express';
import { build, createServer as createViteServer } from 'vite';
import { createServer as createViteServer } from 'vite';
// import { getBuildConfig } from './build';

async function createServer() {
Expand Down

0 comments on commit 8a48917

Please sign in to comment.