summaryrefslogtreecommitdiff
path: root/cli/doc/ts_type.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-04-03 18:35:03 +0200
committerGitHub <noreply@github.com>2020-04-03 18:35:03 +0200
commitefb022a50c8fd4ab598c0bdc6ff0c1978779260a (patch)
treeaa7cd1bede57bad7cfa97aeec3abb7d81fb901ca /cli/doc/ts_type.rs
parent13db64fbc6a8da68e5f6c1da59e058a1a3146054 (diff)
upgrade dprint to 0.9.10 (#4601)
Diffstat (limited to 'cli/doc/ts_type.rs')
-rw-r--r--cli/doc/ts_type.rs68
1 files changed, 34 insertions, 34 deletions
diff --git a/cli/doc/ts_type.rs b/cli/doc/ts_type.rs
index ea3ffcd90..9590c7e60 100644
--- a/cli/doc/ts_type.rs
+++ b/cli/doc/ts_type.rs
@@ -1,27 +1,27 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use super::ParamDef;
+use crate::swc_common::SourceMap;
+use crate::swc_ecma_ast;
+use crate::swc_ecma_ast::TsArrayType;
+use crate::swc_ecma_ast::TsConditionalType;
+use crate::swc_ecma_ast::TsFnOrConstructorType;
+use crate::swc_ecma_ast::TsIndexedAccessType;
+use crate::swc_ecma_ast::TsKeywordType;
+use crate::swc_ecma_ast::TsLit;
+use crate::swc_ecma_ast::TsLitType;
+use crate::swc_ecma_ast::TsOptionalType;
+use crate::swc_ecma_ast::TsParenthesizedType;
+use crate::swc_ecma_ast::TsRestType;
+use crate::swc_ecma_ast::TsThisType;
+use crate::swc_ecma_ast::TsTupleType;
+use crate::swc_ecma_ast::TsType;
+use crate::swc_ecma_ast::TsTypeAnn;
+use crate::swc_ecma_ast::TsTypeLit;
+use crate::swc_ecma_ast::TsTypeOperator;
+use crate::swc_ecma_ast::TsTypeQuery;
+use crate::swc_ecma_ast::TsTypeRef;
+use crate::swc_ecma_ast::TsUnionOrIntersectionType;
use serde::Serialize;
-use swc_common::SourceMap;
-use swc_ecma_ast;
-use swc_ecma_ast::TsArrayType;
-use swc_ecma_ast::TsConditionalType;
-use swc_ecma_ast::TsFnOrConstructorType;
-use swc_ecma_ast::TsIndexedAccessType;
-use swc_ecma_ast::TsKeywordType;
-use swc_ecma_ast::TsLit;
-use swc_ecma_ast::TsLitType;
-use swc_ecma_ast::TsOptionalType;
-use swc_ecma_ast::TsParenthesizedType;
-use swc_ecma_ast::TsRestType;
-use swc_ecma_ast::TsThisType;
-use swc_ecma_ast::TsTupleType;
-use swc_ecma_ast::TsType;
-use swc_ecma_ast::TsTypeAnn;
-use swc_ecma_ast::TsTypeLit;
-use swc_ecma_ast::TsTypeOperator;
-use swc_ecma_ast::TsTypeQuery;
-use swc_ecma_ast::TsTypeRef;
-use swc_ecma_ast::TsUnionOrIntersectionType;
// pub enum TsType {
// * TsKeywordType(TsKeywordType),
@@ -119,7 +119,7 @@ impl Into<TsTypeDef> for &TsTupleType {
impl Into<TsTypeDef> for &TsUnionOrIntersectionType {
fn into(self) -> TsTypeDef {
- use swc_ecma_ast::TsUnionOrIntersectionType::*;
+ use crate::swc_ecma_ast::TsUnionOrIntersectionType::*;
match self {
TsUnionType(union_type) => {
@@ -158,7 +158,7 @@ impl Into<TsTypeDef> for &TsUnionOrIntersectionType {
impl Into<TsTypeDef> for &TsKeywordType {
fn into(self) -> TsTypeDef {
- use swc_ecma_ast::TsKeywordTypeKind::*;
+ use crate::swc_ecma_ast::TsKeywordTypeKind::*;
let keyword_str = match self.kind {
TsAnyKeyword => "any",
@@ -250,7 +250,7 @@ impl Into<TsTypeDef> for &TsThisType {
pub fn ts_entity_name_to_name(
entity_name: &swc_ecma_ast::TsEntityName,
) -> String {
- use swc_ecma_ast::TsEntityName::*;
+ use crate::swc_ecma_ast::TsEntityName::*;
match entity_name {
Ident(ident) => ident.sym.to_string(),
@@ -264,7 +264,7 @@ pub fn ts_entity_name_to_name(
impl Into<TsTypeDef> for &TsTypeQuery {
fn into(self) -> TsTypeDef {
- use swc_ecma_ast::TsTypeQueryExpr::*;
+ use crate::swc_ecma_ast::TsTypeQueryExpr::*;
let type_name = match &self.expr_name {
TsEntityName(entity_name) => ts_entity_name_to_name(&*entity_name),
@@ -333,14 +333,14 @@ impl Into<TsTypeDef> for &TsTypeLit {
let mut call_signatures = vec![];
for type_element in &self.members {
- use swc_ecma_ast::TsTypeElement::*;
+ use crate::swc_ecma_ast::TsTypeElement::*;
match &type_element {
TsMethodSignature(ts_method_sig) => {
let mut params = vec![];
for param in &ts_method_sig.params {
- use swc_ecma_ast::TsFnParam::*;
+ use crate::swc_ecma_ast::TsFnParam::*;
let param_def = match param {
Ident(ident) => {
@@ -382,7 +382,7 @@ impl Into<TsTypeDef> for &TsTypeLit {
let mut params = vec![];
for param in &ts_prop_sig.params {
- use swc_ecma_ast::TsFnParam::*;
+ use crate::swc_ecma_ast::TsFnParam::*;
let param_def = match param {
Ident(ident) => {
@@ -420,7 +420,7 @@ impl Into<TsTypeDef> for &TsTypeLit {
TsCallSignatureDecl(ts_call_sig) => {
let mut params = vec![];
for param in &ts_call_sig.params {
- use swc_ecma_ast::TsFnParam::*;
+ use crate::swc_ecma_ast::TsFnParam::*;
let param_def = match param {
Ident(ident) => {
@@ -488,14 +488,14 @@ impl Into<TsTypeDef> for &TsConditionalType {
impl Into<TsTypeDef> for &TsFnOrConstructorType {
fn into(self) -> TsTypeDef {
- use swc_ecma_ast::TsFnOrConstructorType::*;
+ use crate::swc_ecma_ast::TsFnOrConstructorType::*;
let fn_def = match self {
TsFnType(ts_fn_type) => {
let mut params = vec![];
for param in &ts_fn_type.params {
- use swc_ecma_ast::TsFnParam::*;
+ use crate::swc_ecma_ast::TsFnParam::*;
let param_def = match param {
Ident(ident) => {
@@ -529,7 +529,7 @@ impl Into<TsTypeDef> for &TsFnOrConstructorType {
let mut params = vec![];
for param in &ctor_type.params {
- use swc_ecma_ast::TsFnParam::*;
+ use crate::swc_ecma_ast::TsFnParam::*;
let param_def = match param {
Ident(ident) => {
@@ -571,7 +571,7 @@ impl Into<TsTypeDef> for &TsFnOrConstructorType {
impl Into<TsTypeDef> for &TsType {
fn into(self) -> TsTypeDef {
- use swc_ecma_ast::TsType::*;
+ use crate::swc_ecma_ast::TsType::*;
match self {
TsKeywordType(ref keyword_type) => keyword_type.into(),
@@ -789,7 +789,7 @@ pub fn ts_type_ann_to_def(
source_map: &SourceMap,
type_ann: &TsTypeAnn,
) -> TsTypeDef {
- use swc_ecma_ast::TsType::*;
+ use crate::swc_ecma_ast::TsType::*;
match &*type_ann.type_ann {
TsKeywordType(keyword_type) => keyword_type.into(),